TradingRewardsDistributor
It distributes LOOKS tokens with rolling Merkle airdrops.
Methods
BUFFER_ADMIN_WITHDRAW
function BUFFER_ADMIN_WITHDRAW() external view returns (uint256)
Returns
| Name | Type | Description |
|---|---|---|
| BUFFER_ADMIN_WITHDRAW | uint256 | buffer (in epoch time) for withdrawing LOOKS tokens |
amountClaimedByUser
function amountClaimedByUser(address) external view returns (uint256)
Parameters
| Name | Type | Description |
|---|---|---|
| user | address | address of the user |
Returns
| Name | Type | Description |
|---|---|---|
| - | uint256 | total cumulative amount of LOOKS tokens claimed by the user address |
canClaim
function canClaim(address user, uint256 amount, bytes32[] merkleProof) external view returns (bool, uint256)
Check whether it is possible to claim and how much based on previous distribution
Parameters
| Name | Type | Description |
|---|---|---|
| user | address | address of the user |
| amount | uint256 | amount to claim |
| merkleProof | bytes32[] | array with the merkle proof |
Returns
| Name | Type | Description |
|---|---|---|
| - | bool | whether the user can claim |
| - | uint256 | how many tokens the user can receive |
claim
function claim(uint256 amount, bytes32[] merkleProof) external nonpayable
Claim pending rewards
Parameters
| Name | Type | Description |
|---|---|---|
| amount | uint256 | amount to claim |
| merkleProof | bytes32[] | array containing the merkle proof |
currentRewardRound
function currentRewardRound() external view returns (uint256)
Returns
| Name | Type | Description |
|---|---|---|
| currentRewardRound | uint256 | current reward round |
hasUserClaimedForRewardRound
function hasUserClaimedForRewardRound(uint256, address) external view returns (bool)
Parameters
| Name | Type | Description |
|---|---|---|
| rewardRound | uint256 | reward round |
| user | address | address of the user |
Returns
| Name | Type | Description |
|---|---|---|
| - | bool | whether the user claimed at a given reward round |
lastPausedTimestamp
function lastPausedTimestamp() external view returns (uint256)
Returns
| Name | Type | Description |
|---|---|---|
| lastPausedTimestamp | uint256 | timestamp (epoch) for the last paused |
looksRareToken
function looksRareToken() external view returns (contract IERC20)
Returns
| Name | Type | Description |
|---|---|---|
| looksRareToken | contract IERC20 | address of the LooksRareToken |
merkleRootOfRewardRound
function merkleRootOfRewardRound(uint256) external view returns (bytes32)
Parameters
| Name | Type | Description |
|---|---|---|
| reward round | uint256 | reward round |
Returns
| Name | Type | Description |
|---|---|---|
| merkleRoot | bytes32 | merkle root used for the reward round |
merkleRootUsed
function merkleRootUsed(bytes32) external view returns (bool)
Parameters
| Name | Type | Description |
|---|---|---|
| merkleRoot | bytes32 | merkle root |
Returns
| Name | Type | Description |
|---|---|---|
| - | bool | whether this merkle root has been used in this contract |
owner
function owner() external view returns (address)
Returns the address of the current owner.
Returns
| Name | Type | Description |
|---|---|---|
| owner | address | address of the current owner |
pauseDistribution
function pauseDistribution() external nonpayable
Pause distribution
paused
function paused() external view returns (bool)
Returns true if the contract is paused, and false otherwise.
Returns
| Name | Type | Description |
|---|---|---|
| - | bool | whether the contract is paused (true if paused, false if unpaused) |
renounceOwnership
function renounceOwnership() external nonpayable
Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
transferOwnership
function transferOwnership(address newOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
Parameters
| Name | Type | Description |
|---|---|---|
| newOwner | address | address of the new owner |
unpauseDistribution
function unpauseDistribution() external nonpayable
Unpause distribution
updateTradingRewards
function updateTradingRewards(bytes32 merkleRoot) external nonpayable
Update trading rewards with a new merkle root
It automatically increments the currentRewardRound
Parameters
| Name | Type | Description |
|---|---|---|
| merkleRoot | bytes32 | root of the computed merkle tree |
withdrawTokenRewards
function withdrawTokenRewards(uint256 amount) external nonpayable
Transfer LOOKS tokens back to owner
It is for emergency purposes
Parameters
| Name | Type | Description |
|---|---|---|
| amount | uint256 | amount to withdraw |
Events
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Parameters
| Name | Type | Description |
|---|---|---|
previousOwner indexed | address | address of the previous owner |
newOwner indexed | address | address of the new owner |
Paused
event Paused(address account)
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | - |
RewardsClaim
event RewardsClaim(address indexed user, uint256 indexed rewardRound, uint256 amount)
Parameters
| Name | Type | Description |
|---|---|---|
user indexed | address | user address |
rewardRound indexed | uint256 | reward round |
| amount | uint256 | amount of LOOKS tokens claimed |
TokenWithdrawnOwner
event TokenWithdrawnOwner(uint256 amount)
Parameters
| Name | Type | Description |
|---|---|---|
| amount | uint256 | amount of LOOKS tokens withdrawn by the owner |
Unpaused
event Unpaused(address account)
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | - |
UpdateTradingRewards
event UpdateTradingRewards(uint256 indexed rewardRound)
Parameters
| Name | Type | Description |
|---|---|---|
rewardRound indexed | uint256 | reward round |