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:

spaceStation.ts

Add claim function:

spaceStation.ts

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