*It is only an experimental project as part of my web3 development learning!
An experimental 1inch 1-VIPToken
, an ERC20 token with special features, created to give 1INCH token stakers VIP access to events and parties.
- Used OpenZeppelin's ERC20 and Ownable contracts for a solid and secure foundation
- Designed to airdrop tokens to specific addresses based on their staked 1INCH token amounts (i.e. <1000 st1INCH)
- Transfers between addresses are disabled to eliminate spoofing, allowing only minting and burning of the toke
- The contract owner has control over the airdrop status, enabling or disabling at the event team's discretion
The constructor function initializes the contract with the staking token address (1INCH) and sets the token name and symbol.
This function overrides the _beforeTokenTransfer
function from the ERC20 contract to prevent token transfers between addresses.
This function is used to airdrop OneInchVIPToken
to a list of recipient addresses, based on their staked 1INCH token amount. Only the contract owner can execute this function, and it will only work if the airdrop is active.
This function allows the contract owner to toggle the airdrop status (active or inactive) as needed.
- Deploy the contract with the staking token address (1INCH) as a parameter.
- Use the
airdropTokens
function to airdrop tokens to eligible addresses. - The contract owner can enable or disable the airdrop using the
toggleAirdropStatus
function.