Crowdsale
crowdsale()
crowdsale()
Creates a Crowdsale
builder class instance, which provides methods to build transactions for the Crowdsale Pallet on The Root Network. It expects four parameters:
api
: the trnApi to use for interaction.signer
: the signer to use for signing transactions.walletAddress
: the wallet address to use for interaction. Note: It should be the EOA address for the signer, not the FuturePass address.assetId
: the Sale ID to target.
Example:
The crowdsale
method provides developers with capabilities to claim
, participate
and reddem
vouchers extrinsic.
claim()
claim()
Claims the voucher for the sale. It has no parameter.
Example:
participate()
participate()
Participates in the sale with the amount. It expects one parameter:
amount
: the amount to participate with. It can be a number, bigint or string.
Example:
redeem()
redeem()
Sets the base extrinsic to redeem the voucher for the sale with the quantity. It expects one parameter:
quantity
: the quantity to redeem.
Example:
Last updated