메인 콘텐츠로 건너뛰기

TradingRewardsDistributor

It distributes LOOKS tokens with rolling Merkle airdrops.

Methods

BUFFER_ADMIN_WITHDRAW

function BUFFER_ADMIN_WITHDRAW() external view returns (uint256)

Returns

NameTypeDescription
BUFFER_ADMIN_WITHDRAWuint256buffer (in epoch time) for withdrawing LOOKS tokens

amountClaimedByUser

function amountClaimedByUser(address) external view returns (uint256)

Parameters

NameTypeDescription
useraddressaddress of the user

Returns

NameTypeDescription
-uint256total 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

NameTypeDescription
useraddressaddress of the user
amountuint256amount to claim
merkleProofbytes32[]array with the merkle proof

Returns

NameTypeDescription
-boolwhether the user can claim
-uint256how many tokens the user can receive

claim

function claim(uint256 amount, bytes32[] merkleProof) external nonpayable

Claim pending rewards

Parameters

NameTypeDescription
amountuint256amount to claim
merkleProofbytes32[]array containing the merkle proof

currentRewardRound

function currentRewardRound() external view returns (uint256)

Returns

NameTypeDescription
currentRewardRounduint256current reward round

hasUserClaimedForRewardRound

function hasUserClaimedForRewardRound(uint256, address) external view returns (bool)

Parameters

NameTypeDescription
rewardRounduint256reward round
useraddressaddress of the user

Returns

NameTypeDescription
-boolwhether the user claimed at a given reward round

lastPausedTimestamp

function lastPausedTimestamp() external view returns (uint256)

Returns

NameTypeDescription
lastPausedTimestampuint256timestamp (epoch) for the last paused

looksRareToken

function looksRareToken() external view returns (contract IERC20)

Returns

NameTypeDescription
looksRareTokencontract IERC20address of the LooksRareToken

merkleRootOfRewardRound

function merkleRootOfRewardRound(uint256) external view returns (bytes32)

Parameters

NameTypeDescription
reward rounduint256reward round

Returns

NameTypeDescription
merkleRootbytes32merkle root used for the reward round

merkleRootUsed

function merkleRootUsed(bytes32) external view returns (bool)

Parameters

NameTypeDescription
merkleRootbytes32merkle root

Returns

NameTypeDescription
-boolwhether this merkle root has been used in this contract

owner

function owner() external view returns (address)

Returns the address of the current owner.

Returns

NameTypeDescription
owneraddressaddress 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

NameTypeDescription
-boolwhether 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

NameTypeDescription
newOwneraddressaddress 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

NameTypeDescription
merkleRootbytes32root of the computed merkle tree

withdrawTokenRewards

function withdrawTokenRewards(uint256 amount) external nonpayable

Transfer LOOKS tokens back to owner

It is for emergency purposes

Parameters

NameTypeDescription
amountuint256amount to withdraw

Events

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressaddress of the previous owner
newOwner indexedaddressaddress of the new owner

Paused

event Paused(address account)

Parameters

NameTypeDescription
accountaddress-

RewardsClaim

event RewardsClaim(address indexed user, uint256 indexed rewardRound, uint256 amount)

Parameters

NameTypeDescription
user indexedaddressuser address
rewardRound indexeduint256reward round
amountuint256amount of LOOKS tokens claimed

TokenWithdrawnOwner

event TokenWithdrawnOwner(uint256 amount)

Parameters

NameTypeDescription
amountuint256amount of LOOKS tokens withdrawn by the owner

Unpaused

event Unpaused(address account)

Parameters

NameTypeDescription
accountaddress-

UpdateTradingRewards

event UpdateTradingRewards(uint256 indexed rewardRound)

Parameters

NameTypeDescription
rewardRound indexeduint256reward round