Crowdsale pallet
Derived from live runtime metadata on TRN root (pallet index 49, captured 2026-05-02). For prose-style documentation see Crowdsale on the curated reference side.
- Pallet index
49- Calls
- 8
- Events
- 9
- Errors
- 20
- Storage items
- 6
- Constants
- 7
Calls (extrinsics)
Crowdsale.initialize
See [
Pallet::initialize].
api.tx.crowdsale.initialize(payment_asset_id: u32, collection_id: u32, soft_cap_price: u128, sale_duration: u32, voucher_name: Option<Bytes>, voucher_symbol: Option<Bytes>)| Argument | Type | Doc |
|---|---|---|
payment_asset_id | u32 | AssetId |
collection_id | u32 | CollectionUuid |
soft_cap_price | u128 | Balance |
sale_duration | u32 | BlockNumberFor<T> |
voucher_name | Option<Bytes> | Option<BoundedVec<u8, T::StringLimit>> |
voucher_symbol | Option<Bytes> | Option<BoundedVec<u8, T::StringLimit>> |
Call index: 0
Crowdsale.enable
See [
Pallet::enable].
api.tx.crowdsale.enable(sale_id: u64)| Argument | Type | Doc |
|---|---|---|
sale_id | u64 | SaleId |
Call index: 1
Crowdsale.participate
See [
Pallet::participate].
api.tx.crowdsale.participate(sale_id: u64, amount: u128)| Argument | Type | Doc |
|---|---|---|
sale_id | u64 | SaleId |
amount | u128 | Balance |
Call index: 2
Crowdsale.distribute_crowdsale_rewards
See [
Pallet::distribute_crowdsale_rewards].
api.tx.crowdsale.distribute_crowdsale_rewards()Call index: 3
Crowdsale.claim_voucher
See [
Pallet::claim_voucher].
api.tx.crowdsale.claim_voucher(sale_id: u64)| Argument | Type | Doc |
|---|---|---|
sale_id | u64 | SaleId |
Call index: 4
Crowdsale.redeem_voucher
See [
Pallet::redeem_voucher].
api.tx.crowdsale.redeem_voucher(sale_id: u64, quantity: u32)| Argument | Type | Doc |
|---|---|---|
sale_id | u64 | SaleId |
quantity | u32 | TokenCount |
Call index: 5
Crowdsale.proxy_vault_call
See [
Pallet::proxy_vault_call].
api.tx.crowdsale.proxy_vault_call(sale_id: u64, call: Call)| Argument | Type | Doc |
|---|---|---|
sale_id | u64 | SaleId |
call | Call | Box<<T as Config>::RuntimeCall> |
Call index: 6
Crowdsale.try_force_distribution
See [
Pallet::try_force_distribution].
api.tx.crowdsale.try_force_distribution(sale_id: u64)| Argument | Type | Doc |
|---|---|---|
sale_id | u64 | SaleId |
Call index: 7
Events
Crowdsale.CrowdsaleCreated
Crowdsale created
| Field | Type | Doc |
|---|---|---|
sale_id | u64 | |
info | {"status":"PalletCrowdsaleSaleStatus","admin":"SeedPrimitivesSignatureAccountId20","vault":"SeedPrimitivesSignatureAccountId20","paymentAssetId":"u32","rewardCollectionId":"u32","softCapPrice":"u128","fundsRaised":"u128","participantCount":"u64","voucherAssetId":"u32","duration":"u32"} |
Crowdsale.VaultCallProxied
Call proxied
| Field | Type | Doc |
|---|---|---|
sale_id | u64 | |
who | [u8;20] | |
vault | [u8;20] | |
call | Call |
Crowdsale.CrowdsaleEnabled
Crowdsale enabled
| Field | Type | Doc |
|---|---|---|
sale_id | u64 | |
info | {"status":"PalletCrowdsaleSaleStatus","admin":"SeedPrimitivesSignatureAccountId20","vault":"SeedPrimitivesSignatureAccountId20","paymentAssetId":"u32","rewardCollectionId":"u32","softCapPrice":"u128","fundsRaised":"u128","participantCount":"u64","voucherAssetId":"u32","duration":"u32"} | |
end_block | u32 |
Crowdsale.CrowdsaleParticipated
Crowdsale participated
| Field | Type | Doc |
|---|---|---|
sale_id | u64 | |
who | [u8;20] | |
asset | u32 | |
amount | u128 |
Crowdsale.CrowdsaleNFTRedeemed
Crowdsale NFT redeemed
| Field | Type | Doc |
|---|---|---|
sale_id | u64 | |
who | [u8;20] | |
collection_id | u32 | |
quantity | u32 |
Crowdsale.CrowdsaleClosed
Crowdsale closed
| Field | Type | Doc |
|---|---|---|
sale_id | u64 | |
info | {"status":"PalletCrowdsaleSaleStatus","admin":"SeedPrimitivesSignatureAccountId20","vault":"SeedPrimitivesSignatureAccountId20","paymentAssetId":"u32","rewardCollectionId":"u32","softCapPrice":"u128","fundsRaised":"u128","participantCount":"u64","voucherAssetId":"u32","duration":"u32"} |
Crowdsale.CrowdsaleManualDistribution
Crowdsale distribution was manually triggered
| Field | Type | Doc |
|---|---|---|
sale_id | u64 | |
info | {"status":"PalletCrowdsaleSaleStatus","admin":"SeedPrimitivesSignatureAccountId20","vault":"SeedPrimitivesSignatureAccountId20","paymentAssetId":"u32","rewardCollectionId":"u32","softCapPrice":"u128","fundsRaised":"u128","participantCount":"u64","voucherAssetId":"u32","duration":"u32"} | |
who | [u8;20] |
Crowdsale.CrowdsaleVouchersClaimed
Crowdsale vouchers claimed
| Field | Type | Doc |
|---|---|---|
sale_id | u64 | |
who | [u8;20] | |
amount | u128 |
Crowdsale.CrowdsaleDistributionComplete
Crowdsale distribution has been completed and all vouchers paid out
| Field | Type | Doc |
|---|---|---|
sale_id | u64 | |
vouchers_distributed | u128 |
Errors
Crowdsale.AccessDenied
Access denied
Crowdsale.NoAvailableIds
There are no remaining sale ids
Crowdsale.InvalidBlockRange
The start block is greater than the end block
Crowdsale.CrowdsaleNotFound
Crowdsale was not found
Crowdsale.InvalidCrowdsaleStatus
Invalid crowdsale status
Crowdsale.CrowdsaleNotEnabled
Crowdsale is not enabled
Crowdsale.InvalidSoftCapPrice
The soft cap price must be greater than zero
Crowdsale.InvalidAsset
Invalid asset id
Crowdsale.InvalidMaxIssuance
The collection max issuance is too high
Crowdsale.InvalidAmount
The amount must not be zero
Crowdsale.InvalidQuantity
Redemption quantity must not be zero
Crowdsale.VoucherClaimFailed
The voucher claim could not be completed due to invalid voucher supply
Crowdsale.MaxIssuanceNotSet
The NFT collection max issuance is not set
Crowdsale.CollectionIssuanceNotZero
The NFT collection must not contain any minted NFTs
Crowdsale.CollectionPublicMintable
The NFT collection must not be mintable
Crowdsale.TooManySales
There are too many sales queued for this block, try again on a different block
Crowdsale.VouchersAlreadyClaimed
Vouchers have already been claimed
Crowdsale.SaleDistributionFailed
Automatic trigger of sales distribution has failed
Crowdsale.SaleDurationTooLong
The sale duration is too long
Crowdsale.ExtrinsicForbidden
Extrinsic not allowed
Storage
Crowdsale.NextSaleId
The next available sale id
await api.query.crowdsale.nextSaleId()Returns: u64
Modifier: Default
Crowdsale.SaleInfo
Map from sale id to its information
await api.query.crowdsale.saleInfo(key1)- Key:
u64(hasher: Twox64Concat) - Returns:
{"status":"PalletCrowdsaleSaleStatus","admin":"SeedPrimitivesSignatureAccountId20","vault":"SeedPrimitivesSignatureAccountId20","paymentAssetId":"u32","rewardCollectionId":"u32","softCapPrice":"u128","fundsRaised":"u128","participantCount":"u64","voucherAssetId":"u32","duration":"u32"}
Modifier: Optional
Crowdsale.SaleParticipation
User participation in the sale sale_id -> user -> payment_asset contribution amount
await api.query.crowdsale.saleParticipation(key1, key2)- Key:
(u64,SeedPrimitivesSignatureAccountId20)(hashers: Twox64Concat, Twox64Concat) - Returns:
u128
Modifier: Optional
Crowdsale.SaleEndBlocks
Map from block number to the sales that will end at that block The tuple represents the sale id and the current sale participant distribution index
await api.query.crowdsale.saleEndBlocks(key1)- Key:
u32(hasher: Twox64Concat) - Returns:
Vec<u64>
Modifier: Optional
Crowdsale.SaleDistribution
A list of all sales currently being distributed
await api.query.crowdsale.saleDistribution()Returns: Vec<u64>
Modifier: Default
Crowdsale.NextUnsignedAt
Stores next unsigned tx block number
await api.query.crowdsale.nextUnsignedAt()Returns: u32
Modifier: Default
Constants
Crowdsale.PalletId
This pallet's Id, used for deriving a sovereign account ID
Type: [u8;8]
SCALE-encoded value: 0x63726f776473616c
Crowdsale.StringLimit
The maximum length of a intermediary sale voucher asset name and symbol
Type: u32
SCALE-encoded value: 0x32000000
Crowdsale.MaxSalesPerBlock
The maximum number of sales that can be queued for completion in a single block
Type: u32
SCALE-encoded value: 0x05000000
Crowdsale.MaxConsecutiveSales
The maximum number of sales that can be active at one time
Type: u32
SCALE-encoded value: 0xd0070000
Crowdsale.MaxPaymentsPerBlock
The maximum number of payments that can be processed in the offchain worker per block
Type: u32
SCALE-encoded value: 0x64000000
Crowdsale.MaxSaleDuration
The maximum duration of a sale
Type: u32
SCALE-encoded value: 0xc0a91d00
Crowdsale.UnsignedInterval
Unsigned transaction interval
Type: u32
SCALE-encoded value: 0x07000000
wss://root.rootnet.live/archive/ws · captured 2026-05-02