FluidMerkleDistributorCore
validAddress
modifier validAddress(address value_)
validates that an address is not the zero address
FluidMerkleDistributorAdmin
updateProposer
function updateProposer(address proposer_, bool isProposer_) public
Updates an address status as a root proposer
Parameters
Name | Type | Description |
---|---|---|
proposer_ | address | The address to update |
isProposer_ | bool | Whether or not the address should be an allowed proposer |
approveRoot
function approveRoot(bytes32 root_, bytes32 contentHash_, uint40 cycle_, uint40 startBlock_, uint40 endBlock_) external
Approve the current pending root and content hash
spell
function spell(address[] targets_, bytes[] calldatas_) public
open payload method for admin to resolve emergency cases
pause
function pause() external
Pause contract functionality of new roots and claiming
unpause
function unpause() external
Unpause contract functionality of new roots and claiming
FluidMerkleDistributorProposer
onlyProposer
modifier onlyProposer()
Checks that the sender is a proposer
isProposer
function isProposer(address proposer_) public view returns (bool)
checks if the proposer_
is an allowed root proposer
proposeRoot
function proposeRoot(bytes32 root_, bytes32 contentHash_, uint40 cycle_, uint40 startBlock_, uint40 endBlock_) external
Propose a new root and content hash, which will be stored as pending until approved
FluidMerkleDistributor
constructor
constructor(address owner_, address proposer_) public
hasPendingRoot
function hasPendingRoot() external view returns (bool)
checks if there is a proposed root waiting to be approved
currentMerkleCycle
function currentMerkleCycle() public view returns (struct Structs.MerkleCycle)
merkle root data related to current cycle (proposed and approved).
pendingMerkleCycle
function pendingMerkleCycle() public view returns (struct Structs.MerkleCycle)
merkle root data related to pending cycle (proposed but not yet approved).
encodeClaim
function encodeClaim(address recipient_, uint256 cumulativeAmount_, address fToken_, uint256 cycle_) public pure returns (bytes encoded_, bytes32 hash_)
claim
function claim(address recipient_, uint256 cumulativeAmount_, address fToken_, uint256 cycle_, bytes32[] merkleProof_) external