CompensationClaims
CompensationClaims
_Airdrop for ERC20 tokens.
Provides a coin airdrop with a verification period in which everyone can check that all claims are correct before any actual funds are moved to the contract.
-
Users can claim funds during the claim period.
-
The adjuster can set the amount of each user's claim, but only when unlocked, and not during the claim period.
-
The governor can unlock and lock the adjuster, outside the claim period.
-
The governor can start the claim period, if it's not started.
-
The governor can collect any remaining funds after the claim period is over.
Intended use sequence:
- Governor unlocks the adjuster
- Adjuster uploads claims
- Governor locks the adjuster
- Everyone verifies that the claim amounts and totals are correct
- Payout funds are moved to the contract
- The claim period starts
- Users claim funds
- The claim period ends
- Governor can collect any remaing funds_
adjuster
address adjuster
token
address token
end
uint256 end
totalClaims
uint256 totalClaims
claims
mapping(address => uint256) claims
isAdjusterLocked
bool isAdjusterLocked
Claim
event Claim(address recipient, uint256 amount)
ClaimSet
event ClaimSet(address recipient, uint256 amount)
Start
event Start(uint256 end)
Lock
event Lock()
Unlock
event Unlock()
Collect
event Collect(address coin, uint256 amount)
constructor
constructor(address _token, address _adjuster) public
balanceOf
function balanceOf(address _account) external view returns (uint256)
decimals
function decimals() external view returns (uint8)
claim
function claim(address _recipient) external
setClaims
function setClaims(address[] _addresses, uint256[] _amounts) external
lockAdjuster
function lockAdjuster() external
_lockAdjuster
function _lockAdjuster() internal
unlockAdjuster
function unlockAdjuster() external
start
function start(uint256 _seconds) external
collect
function collect(address _coin) external
onlyInClaimPeriod
modifier onlyInClaimPeriod()
notInClaimPeriod
modifier notInClaimPeriod()
onlyUnlockedAdjuster
modifier onlyUnlockedAdjuster()