Liquid Crowdloan
Extrinsics
Cross-chain transact from Kusama to Bifrost (Contributors have to cross their KSM to Bifrost for using SALP)
api.tx.polkadotXcm.execute
Cross-chain transact from Bifrost to Kusama (for users who want to transfer KSM back to the relay-chain)
api.tx.polkadotXcm.execute
Bifrost call Contribute
api.tx.salp.contribute
Authentication: User’s signature address
Parameter:
index: ParaId; //Contribute to a paraid
value: Balance; //The amount of contribution
Description: The user calls this function to contribute to a
fund
(ongoing).
Parachain auciton fail, call refund function manually
api.tx.salp.refund
Authentication: User’s signature address
Parameter:
index: ParaId; //The paraId needs to refund
Description: When the
fund
fails and the funds have been withdrawable, the user can redeem the contributed funds with the lockedvsToken/vsBond
.
Call the redeem function when parachain fund retired.
api.tx.salp.redeem
Authentication: User’s signature address
Parameter:
index: ParaId; //vsbond Parameter: paraId
value: Balance; //redeem amount
Description: When the user holds the
vsbond
that reaches the redemption period, the combination ofvsbond
+vsToken
can be used to redeem the underlaying KSM, which will be sent to the user’s address on relay chain.
Storage
Query for Bifrost Assets
api.query.tokens.accounts
Parameter:
0: AccountId; //query the address
1: CurrencyId; //type of assets
Description: Query an address’s assets amount.
Query vsKSM,vsBond total issuance
api.query.tokens.totalIssuance
Parameter:
0: CurrencyId; //type of assets
Description: Query assets amount of a paraId.
Query a specific fund info
api.query.salp.funds
Parameter:
0: ParaId; //Parachain ID
Description: Query the fund info of a paraId.
Query the contribution info of a user
aParameter:
0: ParaId; //Parachain ID
1: AccountId; //ss58 account address
Description: Query the contribution info of an user.
Bifrost Service
https://bifrost-service.bifrost.finance/graphql
salp_contributed
Graphql API
Parameter:
account; //ss58 bifrost account address
para_id; //ParaId
Description:Query the contribution details of a certain ParaId/or the contribution details of a certain user address. (Deleting
account
means to query all the contribution details of a ParaId.)
Last updated