IFlowERC20V2
Mints itself according to some predefined schedule. The schedule is
expressed as an expression and the claim
function is world-callable.
Intended behaviour is to avoid sybils infinitely minting by putting the
claim functionality behind a TierV2
contract. The flow contract
itself implements ReadOnlyTier
and every time a claim is processed it
logs the block number of the claim against every tier claimed. So the block
numbers in the tier report for FlowERC20
are the last time that tier
was claimed against this contract. The simplest way to make use of this
information is to take the max block for the underlying tier and the last
claim and then diff it against the current block number.
See test/Claim/FlowERC20.sol.ts
for examples, including providing
staggered rewards where more tokens are minted for higher tier accounts.
Functions
previewFlow
function previewFlow(
Evaluable calldata evaluable,
uint256[] calldata callerContext,
SignedContextV1[] calldata signedContexts
) external view returns (FlowERC20IO calldata);
flow
function flow(Evaluable calldata evaluable, uint256[] calldata callerContext, SignedContextV1[] calldata signedContexts)
external
payable
returns (FlowERC20IO calldata);
Events
Initialize
Contract has initialized.
event Initialize(address sender, FlowERC20Config config);
Parameters
Name | Type | Description |
---|---|---|
sender | address | msg.sender initializing the contract (factory). |
config | FlowERC20Config | All initialized config. |