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 |
updateApprover ​
function updateApprover(address approver_, bool isApprover_) public
Updates an address status as a root approver
Parameters ​
Name | Type | Description |
---|---|---|
approver_ | address | The address to update |
isApprover_ | bool | Whether or not the address should be an allowed approver |
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
FluidMerkleDistributorApprover ​
onlyApprover ​
modifier onlyApprover()
Checks that the sender is an approver
isApprover ​
function isApprover(address approver_) public view returns (bool)
checks if the approver_
is an allowed root approver
approveRoot ​
function approveRoot(bytes32 root_, bytes32 contentHash_, uint40 cycle_, uint40 startBlock_, uint40 endBlock_) external
Approve the current pending root and content hash
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_, address approver_, address rewardToken_) 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_, bytes32 positionId_, uint256 cycle_) public pure returns (bytes encoded_, bytes32 hash_)
claim ​
function claim(address recipient_, uint256 cumulativeAmount_, bytes32 positionId_, uint256 cycle_, bytes32[] merkleProof_) external