FeeSharingSetter
It receives LooksRare protocol fees and owns the FeeSharingSystem contract. It can plug to AMMs for converting all received currencies to WETH.
function DEFAULT_ADMIN_ROLE() external view returns (bytes32)
| Name | Type | Description |
|---|
| DEFAULT_ADMIN_ROLE | bytes32 | default admin role identifier |
function MAX_REWARD_DURATION_IN_BLOCKS() external view returns (uint256)
| Name | Type | Description |
|---|
| MAX_REWARD_DURATION_IN_BLOCKS | uint256 | maximum reward duration that can be set (in blocks) |
function MIN_REWARD_DURATION_IN_BLOCKS() external view returns (uint256)
| Name | Type | Description |
|---|
| MIN_REWARD_DURATION_IN_BLOCKS | uint256 | minimum reward duration that can be set (in blocks) |
function OPERATOR_ROLE() external view returns (bytes32)
| Name | Type | Description |
|---|
| OPERATOR_ROLE | bytes32 | operator role identifier |
function addFeeStakingAddresses(address[] _stakingAddresses) external nonpayable
Add staking addresses
| Name | Type | Description |
|---|
| _stakingAddresses | address[] | array of addresses eligible for fee-sharing only |
function convertCurrencyToRewardToken(address token, bytes additionalData) external nonpayable
Convert currencies to reward token
Function only usable only for whitelisted currencies (where no potential side effect)
| Name | Type | Description |
|---|
| token | address | address of the token to sell |
| additionalData | bytes | additional data (e.g., slippage) |
function feeSharingSystem() external view returns (contract FeeSharingSystem)
| Name | Type | Description |
|---|
| feeSharingSystem | contract FeeSharingSystem | address of the FeeSharingSystem |
function getRoleAdmin(bytes32 role) external view returns (bytes32)
Returns the admin role that controls role. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
| Name | Type | Description |
|---|
| role | bytes32 | - |
| Name | Type | Description |
|---|
| - | bytes32 | - |
function grantRole(bytes32 role, address account) external nonpayable
Grants role to account. If account had not been already granted role, emits a {RoleGranted} event. Requirements: - the caller must have role's admin role.
| Name | Type | Description |
|---|
| role | bytes32 | identifier of the role (e.g., OPERATOR_ROLE) |
| account | address | address of the account |
function hasRole(bytes32 role, address account) external view returns (bool)
Returns true if account has been granted role.
| Name | Type | Description |
|---|
| role | bytes32 | identifier of the role (e.g., OPERATOR_ROLE) |
| account | address | address of the account |
| Name | Type | Description |
|---|
| - | bool | whether the account has been granted the role |
function lastRewardDistributionBlock() external view returns (uint256)
| Name | Type | Description |
|---|
| - | uint256 | block for the last reward distribution |
function looksRareToken() external view returns (contract IERC20)
| Name | Type | Description |
|---|
| looksRareToken | contract IERC20 | address of the LooksRareToken |
function nextRewardDurationInBlocks() external view returns (uint256)
| Name | Type | Description |
|---|
| nextRewardDurationInBlocks | uint256 | next reward duration in blocks (that will apply for the next update of the rewards) |
function removeFeeStakingAddresses(address[] _stakingAddresses) external nonpayable
Remove staking addresses
| Name | Type | Description |
|---|
| _stakingAddresses | address[] | array of addresses eligible for fee-sharing only |
function renounceRole(bytes32 role, address account) external nonpayable
Revokes role from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked role, emits a {RoleRevoked} event. Requirements: - the caller must be account.
| Name | Type | Description |
|---|
| role | bytes32 | identifier of the role (e.g., OPERATOR_ROLE) |
| account | address | address of the account |
function revokeRole(bytes32 role, address account) external nonpayable
Revokes role from account. If account had been granted role, emits a {RoleRevoked} event. Requirements: - the caller must have role's admin role.
| Name | Type | Description |
|---|
| role | bytes32 | identifier of the role (e.g., OPERATOR_ROLE) |
| account | address | address of the account |
function rewardConvertor() external view returns (contract IRewardConvertor)
| Name | Type | Description |
|---|
| rewardConverter | contract IRewardConvertor | address of the reward convertor (it returns address(0) if not set) |
function rewardDurationInBlocks() external view returns (uint256)
| Name | Type | Description |
|---|
| rewardDurationInBlocks | uint256 | current reward duration in blocks |
function rewardToken() external view returns (contract IERC20)
| Name | Type | Description |
|---|
| rewardToken | contract IERC20 | address of the rewardToken (i.e., WETH) |
function setNewRewardDurationInBlocks(uint256 _newRewardDurationInBlocks) external nonpayable
Set new reward duration in blocks for next update
| Name | Type | Description |
|---|
| _newRewardDurationInBlocks | uint256 | number of blocks for new reward period |
function setRewardConvertor(address _rewardConvertor) external nonpayable
Set reward convertor contract
| Name | Type | Description |
|---|
| _rewardConvertor | address | address of the reward convertor (set to null to deactivate) |
function supportsInterface(bytes4 interfaceId) external view returns (bool)
See {IERC165-supportsInterface}.
| Name | Type | Description |
|---|
| interfaceId | bytes4 | - |
| Name | Type | Description |
|---|
| - | bool | whether it supports the interfaceId |
function tokenDistributor() external view returns (contract TokenDistributor)
| Name | Type | Description |
|---|
| tokenDistributor | contract TokenDistributor | address of the TokenDistributor |
function transferOwnershipOfFeeSharingSystem(address _newOwner) external nonpayable
Transfer ownership of fee sharing system
| Name | Type | Description |
|---|
| _newOwner | address | address of the new owner |
function updateRewards() external nonpayable
Update the reward per block (in rewardToken)
It automatically retrieves the number of pending WETH and adjusts based on the balance of LOOKS in fee-staking addresses that exist in the set.
event ConversionToRewardToken(address indexed token, uint256 amountConverted, uint256 amountReceived)
| Name | Type | Description |
|---|
token indexed | address | - |
| amountConverted | uint256 | - |
| amountReceived | uint256 | - |
event FeeStakingAddressesAdded(address[] feeStakingAddresses)
| Name | Type | Description |
|---|
| feeStakingAddresses | address[] | - |
event FeeStakingAddressesRemoved(address[] feeStakingAddresses)
| Name | Type | Description |
|---|
| feeStakingAddresses | address[] | - |
event NewFeeSharingSystemOwner(address newOwner)
| Name | Type | Description |
|---|
| newOwner | address | address of the new owner |
event NewRewardConvertor(address rewardConvertor)
| Name | Type | Description |
|---|
| rewardConvertor | address | - |
event NewRewardDurationInBlocks(uint256 rewardDurationInBlocks)
| Name | Type | Description |
|---|
| rewardDurationInBlocks | uint256 | - |
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)
| Name | Type | Description |
|---|
role indexed | bytes32 | - |
previousAdminRole indexed | bytes32 | - |
newAdminRole indexed | bytes32 | - |
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)
| Name | Type | Description |
|---|
role indexed | bytes32 | - |
account indexed | address | - |
sender indexed | address | - |
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)
| Name | Type | Description |
|---|
role indexed | bytes32 | - |
account indexed | address | - |
sender indexed | address | - |