4. Interact with Contract

In Galaxy Web, we use web3.js to interact with the contract.

Here's an example:

Suppose we want to add Claim feature to the example campaign in http://localhost:3454/AlphaFinanceLab/campaign/26 as the screenshot below:

Document image

First, find the file named spaceStation.ts under contract folder(src/contract/spaceStation.ts). Take Claim feature for instance:

Init contract instance with initContract function:


Add claim function:


Congratulations! You just tried out an example campaign with Claim feature in it!