Disperse.sol
Disperse
Inherits: Ownable
Gas optimized bulk transfers of ERC20 and ETH that collects any given amount of fee in ETH.
Disclaimer: This is a forked and modified contract from PopPunkLLC/gaslite-core in order to collect fees. Original contract without fees can be found on: https://github.com/PopPunkLLC/gaslite-core/blob/d62de3c70fb53d5a315e2e33bfd61587abdd7212/src/GasliteDrop.sol
State Variables
collector
Functions
constructor
Initializes the contract with a collector address
Parameters
Name | Type | Description |
---|---|---|
_collector | address | The address of the fee collector |
setCollector
Sets the collector address
Only the contract owner can call this function
Parameters
Name | Type | Description |
---|---|---|
_collector | address | The address of the fee collector |
airdropERC20
Airdrop ERC20 tokens to a list of addresses
Parameters
Name | Type | Description |
---|---|---|
_token | address | The address of the ERC20 contract |
_addresses | address[] | The addresses to airdrop to |
_amounts | uint256[] | The amounts to airdrop |
_totalAmount | uint256 | The total amount to airdrop |
airdropETH
Airdrop ETH to a list of addresses
Parameters
Name | Type | Description |
---|---|---|
_addresses | address[] | The addresses to airdrop to |
_amounts | uint256[] | The amounts to airdrop |
collectFees
Sends any received Ether to the collector address.
receive
Allows the contract to receive Ether directly with a call to this function.
Any Ether received is stored in the contract’s balance.