📄Airdropper Contract
Contract roles:
Role
Description
DEPLOYER_ROLE (onlyDeployer)
Deployer is the address used to deploy the airdrop contract with a specified ERC20 token
OWNER_ROLE (onlyOwner)
Deployer is the hot wallet address of airdropper.xyz
Owner
0xtodo
Hot wallet address controlled by airdropper.xyz multisignature contract
Variables
token - ERC20
The ERC20 token linked to the contract in order to be dropped.
dropAmount - uint256
The total amount of tokens that can be claimed.
dropCount - uint
The number of addresses that claimed the airdrop.
active - bool
Boolean that represents the state of the airdrop.
Public Functions
getAirdrop()
- Public
getAirdrop()
- PublicEveryone can call this function to claim the airdrop and receive the specified amount of tokens.
The function is available only if the
DEPLOYER_ROLE
activated the airdrop.You can only call it once with your address! Any futher attempts will result in a failed transaction.
getAddresses()
- Public
getAddresses()
- PublicEveryone can call this function to see who benefited from the airdrop.
tokenAmountLeft()
- Public
tokenAmountLeft()
- PublicEveryone can call this function to see the amount of tokens left in the contract.
Owner Functions
setDropAmount()
- onlyDeployer or onlyOwner
setDropAmount()
- onlyDeployer or onlyOwnerOnly the DEPLOYER_ROLE
or the OWNER_ROLE
can call this function to disable the contract and the getAirdrop()
function.
enableAirdrop()
- onlyDeployer or onlyOwner
enableAirdrop()
- onlyDeployer or onlyOwnerOnly the DEPLOYER_ROLE
or the OWNER_ROLE
can call this function to activate the contract and allow the getAirdrop()
function to work.
disableAirdrop()
- onlyDeployer or onlyOwner
disableAirdrop()
- onlyDeployer or onlyOwnerOnly the DEPLOYER_ROLE
or the OWNER_ROLE
can call this function to disable the contract and the getAirdrop()
function.
Last updated