V3AirdropOperator
This contract operates each airdrop. LP and token to be airdropped are determined at the time of creation and cannot be modified.
Code
Github Link: (Will be updated after official launch)
Events, Read-Only Functions, and State-Changing Functions
Read-Only Functions
getAirdropStat
function getAirdropStat() external view returns (
uint256 totalAmount,
uint256 blockAmount,
uint256 distributableBlock,
uint256 endBlock,
uint256 distributed,
uint256 remain,
bool created
) Return Values:
totalAmount
uint256
The total amount of airdrop
blockAmount
uint256
The airdroped amount of token per block
distributableBlock
uint256
The block number of available block
endBlock
uint256
The block number of airdrop ended
distributed
uint256
The amount of current distributed
remain
uint256
The amount of remained
created
bool
intialized
getDistributionId
function getDistributionId() public view returns (bytes32 id)Return Values:
id
bytes32
The ID of the distribution
State-Changing Functions
changeNextOwner
function changeNextOwner(address _nextOwner) externalchangeOwner
function changeOwner() externalcreateDistribution
function createDistribution(
uint256 totalAmount,
uint256 blockAmount,
uint256 startBlock
) externalParameters:
totalAmount
uint256
Total number of tokens to be distributed by airdrop
blockAmount
uint256
Token quantity to be distributed per block
startBlock
uint256
Airdrop start block number
deposit
function deposit(uint256 amount) externalIf there is an issue of token exhaustion or extension during the airdrop process, tokens can be recharged using the AirdropOperator's Deposit function.
When executing the function, transfer more than the amount of tokens entered into the wallet.
The token specified when creating the operator is charged.
When recharging due to exhaustion, it will be applied from the block after recharging.
refixBlockAmount
function refixBlockAmount(uint256 blockAmount) externalModify the amount of tokens distributed per block
It is applied from the block after the transaction is executed.
withdraw
function withdraw(address _token) externalThe remaining tokens can be withdrawn after the Airdrop plan is in progress.
Withdrawal will be made to the owner's account.
Last updated