Airdrop Pallet Extrinsics
Create Airdrop
Create a new Airdrop. This requires that the user puts down a stake in PICA.
If start_at
is Some(MomentOf<T>)
and the MomentOf<T>
is greater than the current
block, the Airdrop will be scheduled to start automatically.
Can be called by any signed origin.
Parameter Sources
start_at
- user provided, optionalvesting_schedule
- user provided
Emits
AirdropCreated
AirdropStarted
Errors
AirdropDoesNotExist
- No Airdrop exist that is associated 'airdrop_id'AirdropAlreadyStarted
- The Airdrop has already started or has been scheduled to startBackToTheFuture
- The providedstart
has already passed
Add Recipient
Add one or more recipients to the Airdrop, specifying the token amount that each provided address will receive.
Only callable by the origin that created the Airdrop.
Parameter Sources
airdrop_id
- user selected, provided by the systemrecipients
- user provided
Emits
RecipientsAdded
Errors
AirdropDoesNotExist
- No Airdrop exist that is associated 'airdrop_id'NotAirdropCreator
- Signer of the origin is not the creator of the Airdrop
Remove Recipient
Remove a recipient from an Airdrop.
Only callable by the origin that created the Airdrop.
Parameter Sources
airdrop_id
- user selected, provided by the systemrecipient
- user selected, provided by the system
Emits
RecipientRemoved
AirdropEnded
Errors
AirdropDoesNotExist
- No Airdrop exist that is associated 'airdrop_id'NotAirdropCreator
- Signer of the origin is not the creator of the AirdropRecipientAlreadyClaimed
- The recipient has already began claiming their funds.RecipientNotFound
- No recipient associated with theidentity
could be found.
Enable Airdrop
Start an Airdrop.
Only callable by the origin that created the Airdrop.
Parameter Sources
airdrop_id
- user selected, provided by the system
Emits
AirdropStarted
Errors
AirdropDoesNotExist
- No Airdrop exist that is associated 'airdrop_id'AirdropAlreadyStarted
- The Airdrop has already started or has been scheduled to startBackToTheFuture
- The providedstart
has already passedNotAirdropCreator
- Signer of the origin is not the creator of the Airdrop
Disable Airdrop
Stop an Airdrop.
Only callable by the origin that created the Airdrop.
Parameter Sources
airdrop_id
- user selected, provided by the system
Emits
AirdropEnded
Errors
AirdropDoesNotExist
- No Airdrop exist that is associated 'airdrop_id'NotAirdropCreator
- Signer of the origin is not the creator of the Airdrop
Claim
Claim recipient funds from an Airdrop.
If no more funds are left to claim, the Airdrop will be removed.
Callable by any unsigned origin.
Parameter Sources
airdrop_id
- user selected, provided by the systemreward_account
- user providedproof
- calculated by the system (requires applicable signing)
Emits
AirdropEnded
Errors
AirdropDoesNotExist
- No Airdrop exist that is associated 'airdrop_id'AirdropIsNotEnabled
- The Airdrop has not been enabledAssociatedWithAnohterAccount
- Associated with a different accountArithmiticError
- Overflow while totaling claimed fundsInvalidProof
RecipientNotFound
- No recipient associated with theidentity
could be found.