More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 121 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 20126359 | 78 days ago | IN | 0 ETH | 0.00116699 | ||||
Get Reward | 19797863 | 124 days ago | IN | 0 ETH | 0.00076322 | ||||
Get Reward | 18914898 | 248 days ago | IN | 0 ETH | 0.00205804 | ||||
Withdraw | 18434204 | 316 days ago | IN | 0 ETH | 0.00221994 | ||||
Get Reward | 18433002 | 316 days ago | IN | 0 ETH | 0.00247227 | ||||
Withdraw | 18135790 | 357 days ago | IN | 0 ETH | 0.00200417 | ||||
Withdraw | 18050403 | 369 days ago | IN | 0 ETH | 0.00118596 | ||||
Lock | 18049808 | 369 days ago | IN | 0 ETH | 0.00328905 | ||||
Withdraw | 18049781 | 369 days ago | IN | 0 ETH | 0.0014447 | ||||
Lock | 18049776 | 369 days ago | IN | 0 ETH | 0.0033904 | ||||
Get Reward | 18046640 | 370 days ago | IN | 0 ETH | 0.00134162 | ||||
Withdraw | 18046638 | 370 days ago | IN | 0 ETH | 0.00104414 | ||||
Withdraw | 18044457 | 370 days ago | IN | 0 ETH | 0.00214163 | ||||
Get Reward | 18044447 | 370 days ago | IN | 0 ETH | 0.00152745 | ||||
Withdraw | 18043380 | 370 days ago | IN | 0 ETH | 0.00191106 | ||||
Get Reward | 18043380 | 370 days ago | IN | 0 ETH | 0.00252875 | ||||
Get Reward | 18043380 | 370 days ago | IN | 0 ETH | 0.00272105 | ||||
Get Reward | 18043380 | 370 days ago | IN | 0 ETH | 0.00250253 | ||||
Withdraw | 18043380 | 370 days ago | IN | 0 ETH | 0.00313529 | ||||
Get Reward | 18043380 | 370 days ago | IN | 0 ETH | 0.00273455 | ||||
Withdraw | 18042579 | 370 days ago | IN | 0 ETH | 0.005054 | ||||
Get Reward | 18042578 | 370 days ago | IN | 0 ETH | 0.0057603 | ||||
Withdraw | 18017553 | 374 days ago | IN | 0 ETH | 0.00233906 | ||||
Lock | 18003165 | 376 days ago | IN | 0 ETH | 0.00254022 | ||||
Get Reward | 18002027 | 376 days ago | IN | 0 ETH | 0.00115285 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
LPRevenueShare
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import './RevenueShareBase.sol'; import '../Constants.sol' as Constants; contract LPRevenueShare is RevenueShareBase { constructor(address _lockToken, uint256 _lockDuration) RevenueShareBase(_lockDuration) { lockToken = IERC20(_lockToken); } /** * @dev Add rewards token to the list * @param _rewardsToken is the reward token address */ function addReward(address _rewardsToken) external override onlyOwner { require(_rewardsToken != address(lockToken), 'Rewards token is staking token'); require( rewardData[_rewardsToken].lastUpdateTime == 0, 'This token already exists as a reward token' ); require( rewardTokens.length < Constants.LIST_SIZE_LIMIT_DEFAULT, 'Reward token list: size limit exceeded' ); rewardTokens.push(_rewardsToken); rewardData[_rewardsToken].lastUpdateTime = block.timestamp; rewardData[_rewardsToken].periodFinish = block.timestamp; } /** * @dev lock `lockToken` tokens to receive rewards in USDC and USDT * 50% can be from a farm or just a simple lock from the user * @param _amount is the number of `lockToken` tokens */ function lock(uint256 _amount) external whenNotPaused { _lock(_amount, msg.sender); } /** * @dev return unseen amount of tokens * @param _token is the provided token address * @param _balance is the provided current balance for the token */ function _unseen( address _token, uint256 _balance ) internal view override returns (uint256 unseen) { unseen = IERC20(_token).balanceOf(address(this)) - _balance; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev 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. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @dev The default token decimals value */ uint256 constant DECIMALS_DEFAULT = 18; /** * @dev The maximum uint256 value for swap amount limit settings */ uint256 constant INFINITY = type(uint256).max; /** * @dev The default limit of account list size */ uint256 constant LIST_SIZE_LIMIT_DEFAULT = 100; /** * @dev The limit of swap router list size */ uint256 constant LIST_SIZE_LIMIT_ROUTERS = 200; /** * @dev The factor for percentage settings. Example: 100 is 0.1% */ uint256 constant MILLIPERCENT_FACTOR = 100_000; /** * @dev The de facto standard address to denote the native token */ address constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @notice Optional value structure * @dev Is used in mappings to allow zero values * @param isSet Value presence flag * @param value Numeric value */ struct OptionalValue { bool isSet; uint256 value; } /** * @notice Key-to-value structure * @dev Is used as an array parameter item to perform multiple key-value settings * @param key Numeric key * @param value Numeric value */ struct KeyToValue { uint256 key; uint256 value; } /** * @notice Key-to-value structure for address values * @dev Is used as an array parameter item to perform multiple key-value settings with address values * @param key Numeric key * @param value Address value */ struct KeyToAddressValue { uint256 key; address value; } /** * @notice Address-to-flag structure * @dev Is used as an array parameter item to perform multiple settings * @param account Account address * @param flag Flag value */ struct AccountToFlag { address account; bool flag; } /** * @notice Emitted when a list exceeds the size limit */ error ListSizeLimitError(); /** * @notice Sets or updates a value in a combined map (a mapping with a key list and key index mapping) * @param _map The mapping reference * @param _keyList The key list reference * @param _keyIndexMap The key list index mapping reference * @param _key The numeric key * @param _value The address value * @param _sizeLimit The map and list size limit * @return isNewKey True if the key was just added, otherwise false */ function combinedMapSet( mapping(uint256 => address) storage _map, uint256[] storage _keyList, mapping(uint256 => OptionalValue) storage _keyIndexMap, uint256 _key, address _value, uint256 _sizeLimit ) returns (bool isNewKey) { isNewKey = !_keyIndexMap[_key].isSet; if (isNewKey) { uniqueListAdd(_keyList, _keyIndexMap, _key, _sizeLimit); } _map[_key] = _value; } /** * @notice Removes a value from a combined map (a mapping with a key list and key index mapping) * @param _map The mapping reference * @param _keyList The key list reference * @param _keyIndexMap The key list index mapping reference * @param _key The numeric key * @return isChanged True if the combined map was changed, otherwise false */ function combinedMapRemove( mapping(uint256 => address) storage _map, uint256[] storage _keyList, mapping(uint256 => OptionalValue) storage _keyIndexMap, uint256 _key ) returns (bool isChanged) { isChanged = _keyIndexMap[_key].isSet; if (isChanged) { delete _map[_key]; uniqueListRemove(_keyList, _keyIndexMap, _key); } } /** * @notice Adds a value to a unique value list (a list with value index mapping) * @param _list The list reference * @param _indexMap The value index mapping reference * @param _value The numeric value * @param _sizeLimit The list size limit * @return isChanged True if the list was changed, otherwise false */ function uniqueListAdd( uint256[] storage _list, mapping(uint256 => OptionalValue) storage _indexMap, uint256 _value, uint256 _sizeLimit ) returns (bool isChanged) { isChanged = !_indexMap[_value].isSet; if (isChanged) { if (_list.length >= _sizeLimit) { revert ListSizeLimitError(); } _indexMap[_value] = OptionalValue(true, _list.length); _list.push(_value); } } /** * @notice Removes a value from a unique value list (a list with value index mapping) * @param _list The list reference * @param _indexMap The value index mapping reference * @param _value The numeric value * @return isChanged True if the list was changed, otherwise false */ function uniqueListRemove( uint256[] storage _list, mapping(uint256 => OptionalValue) storage _indexMap, uint256 _value ) returns (bool isChanged) { OptionalValue storage indexItem = _indexMap[_value]; isChanged = indexItem.isSet; if (isChanged) { uint256 itemIndex = indexItem.value; uint256 lastIndex = _list.length - 1; if (itemIndex != lastIndex) { uint256 lastValue = _list[lastIndex]; _list[itemIndex] = lastValue; _indexMap[lastValue].value = itemIndex; } _list.pop(); delete _indexMap[_value]; } } /** * @notice Adds a value to a unique address value list (a list with value index mapping) * @param _list The list reference * @param _indexMap The value index mapping reference * @param _value The address value * @param _sizeLimit The list size limit * @return isChanged True if the list was changed, otherwise false */ function uniqueAddressListAdd( address[] storage _list, mapping(address => OptionalValue) storage _indexMap, address _value, uint256 _sizeLimit ) returns (bool isChanged) { isChanged = !_indexMap[_value].isSet; if (isChanged) { if (_list.length >= _sizeLimit) { revert ListSizeLimitError(); } _indexMap[_value] = OptionalValue(true, _list.length); _list.push(_value); } } /** * @notice Removes a value from a unique address value list (a list with value index mapping) * @param _list The list reference * @param _indexMap The value index mapping reference * @param _value The address value * @return isChanged True if the list was changed, otherwise false */ function uniqueAddressListRemove( address[] storage _list, mapping(address => OptionalValue) storage _indexMap, address _value ) returns (bool isChanged) { OptionalValue storage indexItem = _indexMap[_value]; isChanged = indexItem.isSet; if (isChanged) { uint256 itemIndex = indexItem.value; uint256 lastIndex = _list.length - 1; if (itemIndex != lastIndex) { address lastValue = _list[lastIndex]; _list[itemIndex] = lastValue; _indexMap[lastValue].value = itemIndex; } _list.pop(); delete _indexMap[_value]; } } /** * @notice Adds or removes a value to/from a unique address value list (a list with value index mapping) * @dev The list size limit is checked on items adding only * @param _list The list reference * @param _indexMap The value index mapping reference * @param _value The address value * @param _flag The value inclusion flag * @param _sizeLimit The list size limit * @return isChanged True if the list was changed, otherwise false */ function uniqueAddressListUpdate( address[] storage _list, mapping(address => OptionalValue) storage _indexMap, address _value, bool _flag, uint256 _sizeLimit ) returns (bool isChanged) { return _flag ? uniqueAddressListAdd(_list, _indexMap, _value, _sizeLimit) : uniqueAddressListRemove(_list, _indexMap, _value); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import { Pausable } from '../Pausable.sol'; abstract contract RevenueShareBase is Ownable, Pausable { using SafeERC20 for IERC20; struct Reward { uint256 periodFinish; uint256 rewardRate; uint256 lastUpdateTime; uint256 rewardPerTokenStored; uint256 balance; } struct Balances { uint256 locked; } struct LockedBalance { uint256 amount; uint256 unlockTime; } struct RewardData { address token; uint256 amount; } bool public publicExitAreSet; uint256 internal constant SHARE_PRECISION = 1e18; uint256 public constant rewardsDuration = 7 days; uint256 public constant rewardLookback = 1 days; uint256 public immutable lockDuration; uint256 public lockedSupply; address[] public rewardTokens; IERC20 public lockToken; mapping(address => Reward) public rewardData; mapping(address => mapping(address => uint)) public userRewardPerTokenPaid; mapping(address => mapping(address => uint)) public rewards; mapping(address => Balances) internal balances; mapping(address => LockedBalance[]) internal userLocks; event Locked(address indexed user, uint256 amount); event WithdrawnExpiredLocks(address indexed user, uint256 amount); event PublicExit(); event RewardPaid(address indexed user, address indexed rewardsToken, uint256 reward); constructor(uint256 _lockDuration) { lockDuration = _lockDuration; } /** * @dev Add rewards token to the list */ function addReward(address _rewardsToken) external virtual; /** * @dev User can withdraw his locked funds without a lock period if publicExitAreSet set */ function publicExit() external onlyOwner { require(!publicExitAreSet, 'public exit are set'); publicExitAreSet = true; emit PublicExit(); } /** * @dev Information on a user's total/locked/available balances * @param _user is the address of the user for which the locked balances are checked * @return total is the amount of locked and unlocked tokens * @return available is the number of unlocked tokens (that are available to withdraw) * @return lockedTotal is the number of locked tokens (that are not available to withdraw yet) * @return lockData is the list with the number of tokens and their unlock time */ function lockedBalances( address _user ) external view returns ( uint256 total, uint256 available, uint256 lockedTotal, LockedBalance[] memory lockData ) { LockedBalance[] storage locks = userLocks[_user]; uint256 idx; for (uint256 i = 0; i < locks.length; i++) { if (locks[i].unlockTime > block.timestamp) { if (idx == 0) { lockData = new LockedBalance[](locks.length - i); } lockData[idx] = locks[i]; idx++; lockedTotal += locks[i].amount; } else { available += locks[i].amount; } } return (balances[_user].locked, available, lockedTotal, lockData); } /** * @dev Withdraw `lockToken` after the locked time (withdraw Expired Locks) */ function withdraw() external { _updateReward(msg.sender); LockedBalance[] storage locks = userLocks[msg.sender]; Balances storage bal = balances[msg.sender]; uint256 amount; uint256 length = locks.length; require(length > 0, 'Amount of locks can not be zero value'); if (locks[length - 1].unlockTime <= block.timestamp || publicExitAreSet) { amount = bal.locked; delete userLocks[msg.sender]; } else { for (uint256 i = 0; i < length; i++) { if (locks[i].unlockTime > block.timestamp) break; amount += locks[i].amount; delete locks[i]; } } require(amount > 0, 'Amount of locked tokens can not be zero value'); bal.locked -= amount; lockedSupply -= amount; lockToken.safeTransfer(msg.sender, amount); emit WithdrawnExpiredLocks(msg.sender, amount); } /** * @dev Address and claimable amount of all reward tokens for the provided user * @param _user is the address of the user for which the rewards are checked * @return _rewards is the list with the amount and token addresses that can be claimed */ function claimableRewards(address _user) external view returns (RewardData[] memory _rewards) { _rewards = new RewardData[](rewardTokens.length); for (uint256 i = 0; i < _rewards.length; i++) { _rewards[i].token = rewardTokens[i]; _rewards[i].amount = _earned( _user, _rewards[i].token, balances[_user].locked, _rewardPerToken(rewardTokens[i], lockedSupply) ) / SHARE_PRECISION; } return _rewards; } /** * @dev Transfer Reward tokens to the user * This function will be executed by anyone every 24 hours (a user or the backend side). * @param _rewardTokens are the reward token addresses */ function getReward(address[] calldata _rewardTokens) external whenNotPaused { _updateReward(msg.sender); _getReward(_rewardTokens); } /** * @dev Returns amount of rewards per token * @param _rewardToken is the reward token address */ function rewardPerToken(address _rewardToken) external view returns (uint256) { return _rewardPerToken(_rewardToken, lockedSupply); } /** * @dev Returns a last datetime for applicable reward * @param _rewardToken the address of the reward token * @return applicableLastTime is the last time applicable reward */ function lastTimeRewardApplicable(address _rewardToken) public view returns (uint256) { uint256 periodFinish = rewardData[_rewardToken].periodFinish; return block.timestamp < periodFinish ? block.timestamp : periodFinish; } /** * @dev main functionality of lock tokens to receive rewards * @param _amount is the number of `lockToken` tokens * @param _onBehalfOf is the address who sent the _amount of tokens for locking */ function _lock(uint256 _amount, address _onBehalfOf) internal { require(_amount > 0, 'Cannot lock 0'); require(_onBehalfOf != address(0), 'address != 0'); require( userLocks[_onBehalfOf].length <= 100, 'User can not execute lock function more than 100 times' ); _updateReward(_onBehalfOf); lockedSupply += _amount; Balances storage bal = balances[_onBehalfOf]; bal.locked += _amount; userLocks[_onBehalfOf].push( LockedBalance({ amount: _amount, unlockTime: block.timestamp + lockDuration }) ); lockToken.safeTransferFrom(msg.sender, address(this), _amount); emit Locked(_onBehalfOf, _amount); } /** * @dev Transfer rewards for the user and notify unseen reward that updates rewardRate * @param _rewardTokens is the provided tokens for getting rewards */ function _getReward(address[] memory _rewardTokens) internal { uint256 length = _rewardTokens.length; for (uint256 i; i < length; i++) { address token = _rewardTokens[i]; uint256 reward = rewards[msg.sender][token] / SHARE_PRECISION; Reward storage r = rewardData[token]; uint256 periodFinish = r.periodFinish; require(periodFinish > 0, 'Unknown reward token'); uint256 balance = r.balance; if (periodFinish < block.timestamp + (rewardsDuration - rewardLookback)) { uint256 unseen = _unseen(token, balance); if (unseen > 0) { _notifyReward(token, unseen); balance += unseen; } } r.balance = balance - reward; if (reward == 0) continue; rewards[msg.sender][token] = 0; IERC20(token).safeTransfer(msg.sender, reward); emit RewardPaid(msg.sender, token, reward); } } /** * @dev Updates rewardRate, periodFinish and lastUpdateTime for provided reward token. * @dev The code is designed in a way that _notifyReward does not force invoke _updateReward method * @param _rewardsToken is the reward token address * @param _reward is the unseen amount of reward token */ function _notifyReward(address _rewardsToken, uint256 _reward) internal { Reward storage r = rewardData[_rewardsToken]; if (block.timestamp >= r.periodFinish) { r.rewardRate = (_reward * SHARE_PRECISION) / rewardsDuration; } else { uint256 remaining = r.periodFinish - block.timestamp; uint256 leftover = (remaining * r.rewardRate) / SHARE_PRECISION; r.rewardRate = ((_reward + leftover) * SHARE_PRECISION) / rewardsDuration; } r.lastUpdateTime = block.timestamp; r.periodFinish = block.timestamp + rewardsDuration; } /** * @dev Updates reward information for the user * @param _user is the user address */ function _updateReward(address _user) internal { for (uint256 i = 0; i < rewardTokens.length; i++) { address token = rewardTokens[i]; Reward storage r = rewardData[token]; uint256 rpt = _rewardPerToken(token, lockedSupply); r.rewardPerTokenStored = rpt; r.lastUpdateTime = lastTimeRewardApplicable(token); if (_user != address(this)) { rewards[_user][token] = _earned(_user, token, balances[_user].locked, rpt); userRewardPerTokenPaid[_user][token] = rpt; } } } /** * @dev Returns current unseen balance for provided token * @param _token is the token that will be checked for the unseen balance * @param _balance is the provided current balance for the token * @return unseen is an amount of calculated unseen balance */ function _unseen( address _token, uint256 _balance ) internal view virtual returns (uint256 unseen); /** * @dev Returns amount of rewards per token * @param _rewardsToken is the reward token address * @param _supply is total locked tokens * @return amount of calculated rewards */ function _rewardPerToken( address _rewardsToken, uint256 _supply ) internal view returns (uint256) { if (_supply == 0) { return rewardData[_rewardsToken].rewardPerTokenStored; } return rewardData[_rewardsToken].rewardPerTokenStored + (((lastTimeRewardApplicable(_rewardsToken) - rewardData[_rewardsToken].lastUpdateTime) * rewardData[_rewardsToken].rewardRate * SHARE_PRECISION) / _supply); } /** * @dev Returns current reward info * @param _user is the user address * @param _rewardsToken is the address of the reward token * @param _balance is the currently locked balance for the user * @param _currentRewardPerToken is the provided current reward per token * @return calculated reward balance */ function _earned( address _user, address _rewardsToken, uint256 _balance, uint256 _currentRewardPerToken ) internal view returns (uint256) { return (_balance * (_currentRewardPerToken - userRewardPerTokenPaid[_user][_rewardsToken])) / SHARE_PRECISION + rewards[_user][_rewardsToken]; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; import { Pausable as PausableBase } from '@openzeppelin/contracts/security/Pausable.sol'; import { ManagerRole } from './roles/ManagerRole.sol'; /** * @title Pausable * @notice Base contract that implements the emergency pause mechanism */ abstract contract Pausable is PausableBase, ManagerRole { /** * @notice Enter pause state */ function pause() external onlyManager whenNotPaused { _pause(); } /** * @notice Exit pause state */ function unpause() external onlyManager whenPaused { _unpause(); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol'; import { RoleBearers } from './RoleBearers.sol'; /** * @title ManagerRole * @notice Base contract that implements the Manager role. * The manager role is a high-permission role for core team members only. * Managers can set vaults and routers addresses, fees, cross-chain protocols, * and other parameters for Interchain (cross-chain) swaps and single-network swaps. * Please note, the manager role is unique for every contract, * hence different addresses may be assigned as managers for different contracts. */ abstract contract ManagerRole is Ownable, RoleBearers { bytes32 private constant ROLE_KEY = keccak256('Manager'); /** * @notice Emitted when the Manager role status for the account is updated * @param account The account address * @param value The Manager role status flag */ event SetManager(address indexed account, bool indexed value); /** * @notice Emitted when the Manager role status for the account is renounced * @param account The account address */ event RenounceManagerRole(address indexed account); /** * @notice Emitted when the caller is not a Manager role bearer */ error OnlyManagerError(); /** * @dev Modifier to check if the caller is a Manager role bearer */ modifier onlyManager() { if (!isManager(msg.sender)) { revert OnlyManagerError(); } _; } /** * @notice Updates the Manager role status for the account * @param _account The account address * @param _value The Manager role status flag */ function setManager(address _account, bool _value) public onlyOwner { _setRoleBearer(ROLE_KEY, _account, _value); emit SetManager(_account, _value); } /** * @notice Renounces the Manager role */ function renounceManagerRole() external onlyManager { _setRoleBearer(ROLE_KEY, msg.sender, false); emit RenounceManagerRole(msg.sender); } /** * @notice Getter of the Manager role bearer count * @return The Manager role bearer count */ function managerCount() external view returns (uint256) { return _roleBearerCount(ROLE_KEY); } /** * @notice Getter of the complete list of the Manager role bearers * @return The complete list of the Manager role bearers */ function fullManagerList() external view returns (address[] memory) { return _fullRoleBearerList(ROLE_KEY); } /** * @notice Getter of the Manager role bearer status * @param _account The account address */ function isManager(address _account) public view returns (bool) { return _isRoleBearer(ROLE_KEY, _account); } function _initRoles( address _owner, address[] memory _managers, bool _addOwnerToManagers ) internal { address ownerAddress = _owner == address(0) ? msg.sender : _owner; for (uint256 index; index < _managers.length; index++) { setManager(_managers[index], true); } if (_addOwnerToManagers && !isManager(ownerAddress)) { setManager(ownerAddress, true); } if (ownerAddress != msg.sender) { transferOwnership(ownerAddress); } } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; import '../Constants.sol' as Constants; import '../DataStructures.sol' as DataStructures; /** * @title RoleBearers * @notice Base contract that implements role-based access control * @dev A custom implementation providing full role bearer lists */ abstract contract RoleBearers { mapping(bytes32 /*roleKey*/ => address[] /*roleBearers*/) private roleBearerTable; mapping(bytes32 /*roleKey*/ => mapping(address /*account*/ => DataStructures.OptionalValue /*status*/)) private roleBearerIndexTable; function _setRoleBearer(bytes32 _roleKey, address _account, bool _value) internal { DataStructures.uniqueAddressListUpdate( roleBearerTable[_roleKey], roleBearerIndexTable[_roleKey], _account, _value, Constants.LIST_SIZE_LIMIT_DEFAULT ); } function _isRoleBearer(bytes32 _roleKey, address _account) internal view returns (bool) { return roleBearerIndexTable[_roleKey][_account].isSet; } function _roleBearerCount(bytes32 _roleKey) internal view returns (uint256) { return roleBearerTable[_roleKey].length; } function _fullRoleBearerList(bytes32 _roleKey) internal view returns (address[] memory) { return roleBearerTable[_roleKey]; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_lockToken","type":"address"},{"internalType":"uint256","name":"_lockDuration","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ListSizeLimitError","type":"error"},{"inputs":[],"name":"OnlyManagerError","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Locked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[],"name":"PublicExit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"RenounceManagerRole","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"rewardsToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"bool","name":"value","type":"bool"}],"name":"SetManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawnExpiredLocks","type":"event"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"addReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"claimableRewards","outputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct RevenueShareBase.RewardData[]","name":"_rewards","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fullManagerList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_rewardTokens","type":"address[]"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"isManager","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"lockedBalances","outputs":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"},{"internalType":"uint256","name":"lockedTotal","type":"uint256"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"}],"internalType":"struct RevenueShareBase.LockedBalance[]","name":"lockData","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"managerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicExit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"publicExitAreSet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceManagerRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardData","outputs":[{"internalType":"uint256","name":"periodFinish","type":"uint256"},{"internalType":"uint256","name":"rewardRate","type":"uint256"},{"internalType":"uint256","name":"lastUpdateTime","type":"uint256"},{"internalType":"uint256","name":"rewardPerTokenStored","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardLookback","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_value","type":"bool"}],"name":"setManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162002445380380620024458339810160408190526200003491620000cd565b6000805460ff19169055806200004a3362000074565b60805250600680546001600160a01b0319166001600160a01b039290921691909117905562000109565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60008060408385031215620000e157600080fd5b82516001600160a01b0381168114620000f957600080fd5b6020939093015192949293505050565b6080516123196200012c600039600081816101e401526117cc01526123196000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80638456cb5911610104578063d7819bc5116100a2578063e70b9e2711610071578063e70b9e2714610465578063f122977714610490578063f2fde38b146104a3578063f3ae2415146104b657600080fd5b8063d7819bc514610410578063dc01f60d1461041d578063dd4670641461043d578063e3725b151461045057600080fd5b8063a5e90eee116100de578063a5e90eee146103d9578063bca7a9e2146103ec578063c2c518e1146103ff578063ca5c7b911461040757600080fd5b80638456cb59146103a85780638da5cb5b146103b05780639c9b2e21146103c657600080fd5b80633f4ba83a1161017c5780637035ab981161014b5780637035ab9814610337578063715018a6146103625780637bb7bed11461036a5780637fd7d0621461039557600080fd5b80633f4ba83a146102a057806348e5d9f8146102a85780635c975abb1461030d578063638634ee1461032457600080fd5b80631a8d58ac116101b85780631a8d58ac1461027a578063386a9525146102845780633b1837d91461028e5780633ccfd60b1461029857600080fd5b806304554443146101df5780630483a7f614610219578063103b73971461023c575b600080fd5b6102067f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61022c610227366004611f1d565b6104c9565b6040516102109493929190611f38565b6000805160206122c483398151915260005260016020527f3c2285c553468ca8f30447b24bb463c127f1b840e23a0cafa23caa79d906669a54610206565b6102826106a3565b005b61020662093a8081565b6102066201518081565b610282610731565b6102826109a6565b6102e56102b6366004611f1d565b600760205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a001610210565b60005460ff165b6040519015158152602001610210565b610206610332366004611f1d565b6109de565b610206610345366004611f9f565b600860209081526000928352604080842090915290825290205481565b610282610a0d565b61037d610378366004611fd2565b610a1f565b6040516001600160a01b039091168152602001610210565b6102826103a3366004611feb565b610a49565b610282610a9a565b60005461010090046001600160a01b031661037d565b6102826103d4366004611f1d565b610ad0565b6102826103e736600461206e565b610c78565b60065461037d906001600160a01b031681565b610282610cd5565b61020660045481565b6003546103149060ff1681565b61043061042b366004611f1d565b610d42565b60405161021091906120a5565b61028261044b366004611fd2565b610eec565b610458610f01565b60405161021091906120fd565b610206610473366004611f9f565b600960209081526000928352604080842090915290825290205481565b61020661049e366004611f1d565b610f1a565b6102826104b1366004611f1d565b610f2e565b6103146104c4366004611f1d565b610fa4565b6001600160a01b0381166000908152600b602052604081208190819060609082805b825481101561067957428382815481106105075761050761214a565b90600052602060002090600202016001015411156106355781600003610595578254610534908290612176565b67ffffffffffffffff81111561054c5761054c612189565b60405190808252806020026020018201604052801561059157816020015b604080518082019091526000808252602082015281526020019060019003908161056a5790505b5093505b8281815481106105a7576105a761214a565b9060005260206000209060020201604051806040016040529081600082015481526020016001820154815250508483815181106105e6576105e661214a565b602002602001018190525081806105fc9061219f565b9250508281815481106106115761061161214a565b9060005260206000209060020201600001548561062e91906121b8565b9450610667565b8281815481106106475761064761214a565b9060005260206000209060020201600001548661066491906121b8565b95505b806106718161219f565b9150506104eb565b5050506001600160a01b0385166000908152600a602052604090205493509193509193565b905090565b6106ab610fe4565b60035460ff16156106f95760405162461bcd60e51b81526020600482015260136024820152721c1d589b1a58c8195e1a5d08185c99481cd95d606a1b60448201526064015b60405180910390fd5b6003805460ff191660011790556040517f92fb066508f6e473238e612a1be92027ac740a33503653b7bec94c6f8308e0ce90600090a1565b61073a33611044565b336000908152600b60209081526040808320600a9092528220815491929091806107b45760405162461bcd60e51b815260206004820152602560248201527f416d6f756e74206f66206c6f636b732063616e206e6f74206265207a65726f2060448201526476616c756560d81b60648201526084016106f0565b42846107c1600184612176565b815481106107d1576107d161214a565b9060005260206000209060020201600101541115806107f2575060035460ff165b1561081a578254336000908152600b602052604081209193506108159190611ec6565b6108bc565b60005b818110156108ba57428582815481106108385761083861214a565b906000526020600020906002020160010154116108ba578481815481106108615761086161214a565b9060005260206000209060020201600001548361087e91906121b8565b92508481815481106108925761089261214a565b60009182526020822060029091020181815560010155806108b28161219f565b91505061081d565b505b600082116109225760405162461bcd60e51b815260206004820152602d60248201527f416d6f756e74206f66206c6f636b656420746f6b656e732063616e206e6f742060448201526c6265207a65726f2076616c756560981b60648201526084016106f0565b818360000160008282546109369190612176565b92505081905550816004600082825461094f9190612176565b909155505060065461096b906001600160a01b03163384611141565b60405182815233907f401321eacd32d0779a1de4ef7e54230af5e1a657bb38a39afb7f3916aecc357a9060200160405180910390a250505050565b6109af33610fa4565b6109cc57604051637c3ea23f60e01b815260040160405180910390fd5b6109d46111a9565b6109dc6111f2565b565b6001600160a01b038116600090815260076020526040812054428111610a045780610a06565b425b9392505050565b610a15610fe4565b6109dc6000611244565b60058181548110610a2f57600080fd5b6000918252602090912001546001600160a01b0316905081565b610a5161129d565b610a5a33611044565b610a968282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112e392505050565b5050565b610aa333610fa4565b610ac057604051637c3ea23f60e01b815260040160405180910390fd5b610ac861129d565b6109dc6114a8565b610ad8610fe4565b6006546001600160a01b0390811690821603610b365760405162461bcd60e51b815260206004820152601e60248201527f5265776172647320746f6b656e206973207374616b696e6720746f6b656e000060448201526064016106f0565b6001600160a01b03811660009081526007602052604090206002015415610bb35760405162461bcd60e51b815260206004820152602b60248201527f5468697320746f6b656e20616c7265616479206578697374732061732061207260448201526a32bbb0b932103a37b5b2b760a91b60648201526084016106f0565b600554606411610c145760405162461bcd60e51b815260206004820152602660248201527f52657761726420746f6b656e206c6973743a2073697a65206c696d697420657860448201526518d95959195960d21b60648201526084016106f0565b60058054600181019091557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b039092166001600160a01b031990921682179055600090815260076020526040902042600282018190559055565b610c80610fe4565b610c996000805160206122c483398151915283836114e5565b604051811515906001600160a01b038416907fbe9474bb3e78da7e315cdffa5cfa30b767fcc95bbf44a6197da60228eea1028690600090a35050565b610cde33610fa4565b610cfb57604051637c3ea23f60e01b815260040160405180910390fd5b610d156000805160206122c48339815191523360006114e5565b60405133907f6cc2c67081f55c2fffb7c008fa995fbbf890f48c7c16fba93d8220f00dc84cc590600090a2565b60055460609067ffffffffffffffff811115610d6057610d60612189565b604051908082528060200260200182016040528015610da557816020015b6040805180820190915260008082526020820152815260200190600190039081610d7e5790505b50905060005b8151811015610ee65760058181548110610dc757610dc761214a565b9060005260206000200160009054906101000a90046001600160a01b0316828281518110610df757610df761214a565b6020026020010151600001906001600160a01b031690816001600160a01b031681525050670de0b6b3a7640000610eaa84848481518110610e3a57610e3a61214a565b602002602001015160000151600a6000886001600160a01b03166001600160a01b0316815260200190815260200160002060000154610ea560058781548110610e8557610e8561214a565b6000918252602090912001546004546001600160a01b0390911690611512565b6115c4565b610eb491906121cb565b828281518110610ec657610ec661214a565b602090810291909101810151015280610ede8161219f565b915050610dab565b50919050565b610ef461129d565b610efe813361163e565b50565b606061069e6000805160206122c483398151915261187a565b6000610f2882600454611512565b92915050565b610f36610fe4565b6001600160a01b038116610f9b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f0565b610efe81611244565b6001600160a01b03811660009081527f260b29b219d450563ddb0e5ca806bdadb1e125f7e8c506de0443797dd7122728602052604081205460ff16610f28565b6000546001600160a01b036101009091041633146109dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f0565b60005b600554811015610a96576000600582815481106110665761106661214a565b60009182526020808320909101546001600160a01b0316808352600790915260408220600454919350919061109c908490611512565b6003830181905590506110ae836109de565b60028301556001600160a01b038516301461112b576001600160a01b0385166000908152600a60205260409020546110ea9086908590846115c4565b6001600160a01b0380871660008181526009602090815260408083209489168084529482528083209590955591815260088252838120928152919052208190555b50505080806111399061219f565b915050611047565b6040516001600160a01b0383166024820152604481018290526111a490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526118e6565b505050565b60005460ff166109dc5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106f0565b6111fa6111a9565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60005460ff16156109dc5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106f0565b805160005b818110156111a45760008382815181106113045761130461214a565b6020908102919091018101513360009081526009835260408082206001600160a01b03841683529093529182205490925061134890670de0b6b3a7640000906121cb565b6001600160a01b0383166000908152600760205260409020805491925090806113aa5760405162461bcd60e51b81526020600482015260146024820152732ab735b737bbb7103932bbb0b932103a37b5b2b760611b60448201526064016106f0565b60048201546113bf6201518062093a80612176565b6113c990426121b8565b8210156113fd5760006113dc86836119b8565b905080156113fb576113ee8682611a2f565b6113f881836121b8565b91505b505b6114078482612176565b6004840155600084900361141f575050505050611496565b3360008181526009602090815260408083206001600160a01b038a1680855292528220919091556114509186611141565b6040518481526001600160a01b0386169033907f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e9060200160405180910390a350505050505b806114a08161219f565b9150506112e8565b6114b061129d565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586112273390565b6000838152600160209081526040808320600290925290912061150c919084846064611b01565b50505050565b60008160000361153e57506001600160a01b038216600090815260076020526040902060030154610f28565b6001600160a01b038316600090815260076020526040902060018101546002909101548391670de0b6b3a764000091611576876109de565b6115809190612176565b61158a91906121ed565b61159491906121ed565b61159e91906121cb565b6001600160a01b038416600090815260076020526040902060030154610a0691906121b8565b6001600160a01b038085166000818152600960209081526040808320948816808452948252808320549383526008825280832094835293905291822054670de0b6b3a7640000906116159085612176565b61161f90866121ed565b61162991906121cb565b61163391906121b8565b90505b949350505050565b6000821161167e5760405162461bcd60e51b815260206004820152600d60248201526c043616e6e6f74206c6f636b203609c1b60448201526064016106f0565b6001600160a01b0381166116c35760405162461bcd60e51b815260206004820152600c60248201526b06164647265737320213d20360a41b60448201526064016106f0565b6001600160a01b0381166000908152600b60205260409020546064101561174b5760405162461bcd60e51b815260206004820152603660248201527f557365722063616e206e6f742065786563757465206c6f636b2066756e6374696044820152756f6e206d6f7265207468616e203130302074696d657360501b60648201526084016106f0565b61175481611044565b816004600082825461176691906121b8565b90915550506001600160a01b0381166000908152600a602052604081208054909184918391906117979084906121b8565b90915550506001600160a01b0382166000908152600b60209081526040918290208251808401909352858352919081016117f17f0000000000000000000000000000000000000000000000000000000000000000426121b8565b9052815460018181018455600093845260209384902083516002909302019182559290910151910155600654611832906001600160a01b0316333086611b2e565b816001600160a01b03167f9f1ec8c880f76798e7b793325d625e9b60e4082a553c98f42b6cda368dd600088460405161186d91815260200190565b60405180910390a2505050565b6000818152600160209081526040918290208054835181840281018401909452808452606093928301828280156118da57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116118bc575b50505050509050919050565b600061193b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b669092919063ffffffff16565b8051909150156111a457808060200190518101906119599190612204565b6111a45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106f0565b6040516370a0823160e01b815230600482015260009082906001600160a01b038516906370a0823190602401602060405180830381865afa158015611a01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a259190612221565b610a069190612176565b6001600160a01b038216600090815260076020526040902080544210611a795762093a80611a65670de0b6b3a7640000846121ed565b611a6f91906121cb565b6001820155611ae5565b8054600090611a89904290612176565b90506000670de0b6b3a7640000836001015483611aa691906121ed565b611ab091906121cb565b905062093a80670de0b6b3a7640000611ac983876121b8565b611ad391906121ed565b611add91906121cb565b600184015550505b4260028201819055611afb9062093a80906121b8565b90555050565b600082611b1857611b13868686611b75565b611b24565b611b2486868685611c9d565b9695505050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261150c9085906323b872dd60e01b9060840161116d565b60606116368484600085611d4d565b6001600160a01b0381166000908152602083905260409020805460ff16908115611c955760018082015486549091600091611bb09190612176565b9050808214611c3d576000878281548110611bcd57611bcd61214a565b9060005260206000200160009054906101000a90046001600160a01b0316905080888481548110611c0057611c0061214a565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815290879052604090206001018290555b86805480611c4d57611c4d61223a565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038716825287905260408120805460ff191681556001015550505b509392505050565b6001600160a01b03821660009081526020849052604090205460ff161580156116365784548211611ce15760405163b1655e3360e01b815260040160405180910390fd5b6040805180820182526001808252875460208084019182526001600160a01b039790971660008181529888529388209251835460ff19169015151783555191810191909155865490810187559585529290932090930180546001600160a01b0319169091179055919050565b606082471015611dae5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106f0565b600080866001600160a01b03168587604051611dca9190612274565b60006040518083038185875af1925050503d8060008114611e07576040519150601f19603f3d011682016040523d82523d6000602084013e611e0c565b606091505b5091509150611e1d87838387611e28565b979650505050505050565b60608315611e97578251600003611e90576001600160a01b0385163b611e905760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106f0565b5081611636565b6116368383815115611eac5781518083602001fd5b8060405162461bcd60e51b81526004016106f09190612290565b5080546000825560020290600052602060002090810190610efe91905b80821115611efd5760008082556001820155600201611ee3565b5090565b80356001600160a01b0381168114611f1857600080fd5b919050565b600060208284031215611f2f57600080fd5b610a0682611f01565b60006080820186835260208681850152604086818601526080606086015282865180855260a087019150838801945060005b81811015611f8f57855180518452850151858401529484019491830191600101611f6a565b50909a9950505050505050505050565b60008060408385031215611fb257600080fd5b611fbb83611f01565b9150611fc960208401611f01565b90509250929050565b600060208284031215611fe457600080fd5b5035919050565b60008060208385031215611ffe57600080fd5b823567ffffffffffffffff8082111561201657600080fd5b818501915085601f83011261202a57600080fd5b81358181111561203957600080fd5b8660208260051b850101111561204e57600080fd5b60209290920196919550909350505050565b8015158114610efe57600080fd5b6000806040838503121561208157600080fd5b61208a83611f01565b9150602083013561209a81612060565b809150509250929050565b602080825282518282018190526000919060409081850190868401855b828110156120f057815180516001600160a01b031685528601518685015292840192908501906001016120c2565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561213e5783516001600160a01b031683529284019291840191600101612119565b50909695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610f2857610f28612160565b634e487b7160e01b600052604160045260246000fd5b6000600182016121b1576121b1612160565b5060010190565b80820180821115610f2857610f28612160565b6000826121e857634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417610f2857610f28612160565b60006020828403121561221657600080fd5b8151610a0681612060565b60006020828403121561223357600080fd5b5051919050565b634e487b7160e01b600052603160045260246000fd5b60005b8381101561226b578181015183820152602001612253565b50506000910152565b60008251612286818460208701612250565b9190910192915050565b60208152600082518060208401526122af816040850160208701612250565b601f01601f1916919091016040019291505056fe6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6fa2646970667358221220934551d33a0fb26ddad7ebd001df9603a285232fde37e9afced8bb928319765464736f6c63430008130033000000000000000000000000152e2502c22f73a7493df8b856836efbc69e37180000000000000000000000000000000000000000000000000000000000015180
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c80638456cb5911610104578063d7819bc5116100a2578063e70b9e2711610071578063e70b9e2714610465578063f122977714610490578063f2fde38b146104a3578063f3ae2415146104b657600080fd5b8063d7819bc514610410578063dc01f60d1461041d578063dd4670641461043d578063e3725b151461045057600080fd5b8063a5e90eee116100de578063a5e90eee146103d9578063bca7a9e2146103ec578063c2c518e1146103ff578063ca5c7b911461040757600080fd5b80638456cb59146103a85780638da5cb5b146103b05780639c9b2e21146103c657600080fd5b80633f4ba83a1161017c5780637035ab981161014b5780637035ab9814610337578063715018a6146103625780637bb7bed11461036a5780637fd7d0621461039557600080fd5b80633f4ba83a146102a057806348e5d9f8146102a85780635c975abb1461030d578063638634ee1461032457600080fd5b80631a8d58ac116101b85780631a8d58ac1461027a578063386a9525146102845780633b1837d91461028e5780633ccfd60b1461029857600080fd5b806304554443146101df5780630483a7f614610219578063103b73971461023c575b600080fd5b6102067f000000000000000000000000000000000000000000000000000000000001518081565b6040519081526020015b60405180910390f35b61022c610227366004611f1d565b6104c9565b6040516102109493929190611f38565b6000805160206122c483398151915260005260016020527f3c2285c553468ca8f30447b24bb463c127f1b840e23a0cafa23caa79d906669a54610206565b6102826106a3565b005b61020662093a8081565b6102066201518081565b610282610731565b6102826109a6565b6102e56102b6366004611f1d565b600760205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a001610210565b60005460ff165b6040519015158152602001610210565b610206610332366004611f1d565b6109de565b610206610345366004611f9f565b600860209081526000928352604080842090915290825290205481565b610282610a0d565b61037d610378366004611fd2565b610a1f565b6040516001600160a01b039091168152602001610210565b6102826103a3366004611feb565b610a49565b610282610a9a565b60005461010090046001600160a01b031661037d565b6102826103d4366004611f1d565b610ad0565b6102826103e736600461206e565b610c78565b60065461037d906001600160a01b031681565b610282610cd5565b61020660045481565b6003546103149060ff1681565b61043061042b366004611f1d565b610d42565b60405161021091906120a5565b61028261044b366004611fd2565b610eec565b610458610f01565b60405161021091906120fd565b610206610473366004611f9f565b600960209081526000928352604080842090915290825290205481565b61020661049e366004611f1d565b610f1a565b6102826104b1366004611f1d565b610f2e565b6103146104c4366004611f1d565b610fa4565b6001600160a01b0381166000908152600b602052604081208190819060609082805b825481101561067957428382815481106105075761050761214a565b90600052602060002090600202016001015411156106355781600003610595578254610534908290612176565b67ffffffffffffffff81111561054c5761054c612189565b60405190808252806020026020018201604052801561059157816020015b604080518082019091526000808252602082015281526020019060019003908161056a5790505b5093505b8281815481106105a7576105a761214a565b9060005260206000209060020201604051806040016040529081600082015481526020016001820154815250508483815181106105e6576105e661214a565b602002602001018190525081806105fc9061219f565b9250508281815481106106115761061161214a565b9060005260206000209060020201600001548561062e91906121b8565b9450610667565b8281815481106106475761064761214a565b9060005260206000209060020201600001548661066491906121b8565b95505b806106718161219f565b9150506104eb565b5050506001600160a01b0385166000908152600a602052604090205493509193509193565b905090565b6106ab610fe4565b60035460ff16156106f95760405162461bcd60e51b81526020600482015260136024820152721c1d589b1a58c8195e1a5d08185c99481cd95d606a1b60448201526064015b60405180910390fd5b6003805460ff191660011790556040517f92fb066508f6e473238e612a1be92027ac740a33503653b7bec94c6f8308e0ce90600090a1565b61073a33611044565b336000908152600b60209081526040808320600a9092528220815491929091806107b45760405162461bcd60e51b815260206004820152602560248201527f416d6f756e74206f66206c6f636b732063616e206e6f74206265207a65726f2060448201526476616c756560d81b60648201526084016106f0565b42846107c1600184612176565b815481106107d1576107d161214a565b9060005260206000209060020201600101541115806107f2575060035460ff165b1561081a578254336000908152600b602052604081209193506108159190611ec6565b6108bc565b60005b818110156108ba57428582815481106108385761083861214a565b906000526020600020906002020160010154116108ba578481815481106108615761086161214a565b9060005260206000209060020201600001548361087e91906121b8565b92508481815481106108925761089261214a565b60009182526020822060029091020181815560010155806108b28161219f565b91505061081d565b505b600082116109225760405162461bcd60e51b815260206004820152602d60248201527f416d6f756e74206f66206c6f636b656420746f6b656e732063616e206e6f742060448201526c6265207a65726f2076616c756560981b60648201526084016106f0565b818360000160008282546109369190612176565b92505081905550816004600082825461094f9190612176565b909155505060065461096b906001600160a01b03163384611141565b60405182815233907f401321eacd32d0779a1de4ef7e54230af5e1a657bb38a39afb7f3916aecc357a9060200160405180910390a250505050565b6109af33610fa4565b6109cc57604051637c3ea23f60e01b815260040160405180910390fd5b6109d46111a9565b6109dc6111f2565b565b6001600160a01b038116600090815260076020526040812054428111610a045780610a06565b425b9392505050565b610a15610fe4565b6109dc6000611244565b60058181548110610a2f57600080fd5b6000918252602090912001546001600160a01b0316905081565b610a5161129d565b610a5a33611044565b610a968282808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506112e392505050565b5050565b610aa333610fa4565b610ac057604051637c3ea23f60e01b815260040160405180910390fd5b610ac861129d565b6109dc6114a8565b610ad8610fe4565b6006546001600160a01b0390811690821603610b365760405162461bcd60e51b815260206004820152601e60248201527f5265776172647320746f6b656e206973207374616b696e6720746f6b656e000060448201526064016106f0565b6001600160a01b03811660009081526007602052604090206002015415610bb35760405162461bcd60e51b815260206004820152602b60248201527f5468697320746f6b656e20616c7265616479206578697374732061732061207260448201526a32bbb0b932103a37b5b2b760a91b60648201526084016106f0565b600554606411610c145760405162461bcd60e51b815260206004820152602660248201527f52657761726420746f6b656e206c6973743a2073697a65206c696d697420657860448201526518d95959195960d21b60648201526084016106f0565b60058054600181019091557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b039092166001600160a01b031990921682179055600090815260076020526040902042600282018190559055565b610c80610fe4565b610c996000805160206122c483398151915283836114e5565b604051811515906001600160a01b038416907fbe9474bb3e78da7e315cdffa5cfa30b767fcc95bbf44a6197da60228eea1028690600090a35050565b610cde33610fa4565b610cfb57604051637c3ea23f60e01b815260040160405180910390fd5b610d156000805160206122c48339815191523360006114e5565b60405133907f6cc2c67081f55c2fffb7c008fa995fbbf890f48c7c16fba93d8220f00dc84cc590600090a2565b60055460609067ffffffffffffffff811115610d6057610d60612189565b604051908082528060200260200182016040528015610da557816020015b6040805180820190915260008082526020820152815260200190600190039081610d7e5790505b50905060005b8151811015610ee65760058181548110610dc757610dc761214a565b9060005260206000200160009054906101000a90046001600160a01b0316828281518110610df757610df761214a565b6020026020010151600001906001600160a01b031690816001600160a01b031681525050670de0b6b3a7640000610eaa84848481518110610e3a57610e3a61214a565b602002602001015160000151600a6000886001600160a01b03166001600160a01b0316815260200190815260200160002060000154610ea560058781548110610e8557610e8561214a565b6000918252602090912001546004546001600160a01b0390911690611512565b6115c4565b610eb491906121cb565b828281518110610ec657610ec661214a565b602090810291909101810151015280610ede8161219f565b915050610dab565b50919050565b610ef461129d565b610efe813361163e565b50565b606061069e6000805160206122c483398151915261187a565b6000610f2882600454611512565b92915050565b610f36610fe4565b6001600160a01b038116610f9b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f0565b610efe81611244565b6001600160a01b03811660009081527f260b29b219d450563ddb0e5ca806bdadb1e125f7e8c506de0443797dd7122728602052604081205460ff16610f28565b6000546001600160a01b036101009091041633146109dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f0565b60005b600554811015610a96576000600582815481106110665761106661214a565b60009182526020808320909101546001600160a01b0316808352600790915260408220600454919350919061109c908490611512565b6003830181905590506110ae836109de565b60028301556001600160a01b038516301461112b576001600160a01b0385166000908152600a60205260409020546110ea9086908590846115c4565b6001600160a01b0380871660008181526009602090815260408083209489168084529482528083209590955591815260088252838120928152919052208190555b50505080806111399061219f565b915050611047565b6040516001600160a01b0383166024820152604481018290526111a490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526118e6565b505050565b60005460ff166109dc5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106f0565b6111fa6111a9565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60005460ff16156109dc5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106f0565b805160005b818110156111a45760008382815181106113045761130461214a565b6020908102919091018101513360009081526009835260408082206001600160a01b03841683529093529182205490925061134890670de0b6b3a7640000906121cb565b6001600160a01b0383166000908152600760205260409020805491925090806113aa5760405162461bcd60e51b81526020600482015260146024820152732ab735b737bbb7103932bbb0b932103a37b5b2b760611b60448201526064016106f0565b60048201546113bf6201518062093a80612176565b6113c990426121b8565b8210156113fd5760006113dc86836119b8565b905080156113fb576113ee8682611a2f565b6113f881836121b8565b91505b505b6114078482612176565b6004840155600084900361141f575050505050611496565b3360008181526009602090815260408083206001600160a01b038a1680855292528220919091556114509186611141565b6040518481526001600160a01b0386169033907f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e9060200160405180910390a350505050505b806114a08161219f565b9150506112e8565b6114b061129d565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586112273390565b6000838152600160209081526040808320600290925290912061150c919084846064611b01565b50505050565b60008160000361153e57506001600160a01b038216600090815260076020526040902060030154610f28565b6001600160a01b038316600090815260076020526040902060018101546002909101548391670de0b6b3a764000091611576876109de565b6115809190612176565b61158a91906121ed565b61159491906121ed565b61159e91906121cb565b6001600160a01b038416600090815260076020526040902060030154610a0691906121b8565b6001600160a01b038085166000818152600960209081526040808320948816808452948252808320549383526008825280832094835293905291822054670de0b6b3a7640000906116159085612176565b61161f90866121ed565b61162991906121cb565b61163391906121b8565b90505b949350505050565b6000821161167e5760405162461bcd60e51b815260206004820152600d60248201526c043616e6e6f74206c6f636b203609c1b60448201526064016106f0565b6001600160a01b0381166116c35760405162461bcd60e51b815260206004820152600c60248201526b06164647265737320213d20360a41b60448201526064016106f0565b6001600160a01b0381166000908152600b60205260409020546064101561174b5760405162461bcd60e51b815260206004820152603660248201527f557365722063616e206e6f742065786563757465206c6f636b2066756e6374696044820152756f6e206d6f7265207468616e203130302074696d657360501b60648201526084016106f0565b61175481611044565b816004600082825461176691906121b8565b90915550506001600160a01b0381166000908152600a602052604081208054909184918391906117979084906121b8565b90915550506001600160a01b0382166000908152600b60209081526040918290208251808401909352858352919081016117f17f0000000000000000000000000000000000000000000000000000000000015180426121b8565b9052815460018181018455600093845260209384902083516002909302019182559290910151910155600654611832906001600160a01b0316333086611b2e565b816001600160a01b03167f9f1ec8c880f76798e7b793325d625e9b60e4082a553c98f42b6cda368dd600088460405161186d91815260200190565b60405180910390a2505050565b6000818152600160209081526040918290208054835181840281018401909452808452606093928301828280156118da57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116118bc575b50505050509050919050565b600061193b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b669092919063ffffffff16565b8051909150156111a457808060200190518101906119599190612204565b6111a45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106f0565b6040516370a0823160e01b815230600482015260009082906001600160a01b038516906370a0823190602401602060405180830381865afa158015611a01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a259190612221565b610a069190612176565b6001600160a01b038216600090815260076020526040902080544210611a795762093a80611a65670de0b6b3a7640000846121ed565b611a6f91906121cb565b6001820155611ae5565b8054600090611a89904290612176565b90506000670de0b6b3a7640000836001015483611aa691906121ed565b611ab091906121cb565b905062093a80670de0b6b3a7640000611ac983876121b8565b611ad391906121ed565b611add91906121cb565b600184015550505b4260028201819055611afb9062093a80906121b8565b90555050565b600082611b1857611b13868686611b75565b611b24565b611b2486868685611c9d565b9695505050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261150c9085906323b872dd60e01b9060840161116d565b60606116368484600085611d4d565b6001600160a01b0381166000908152602083905260409020805460ff16908115611c955760018082015486549091600091611bb09190612176565b9050808214611c3d576000878281548110611bcd57611bcd61214a565b9060005260206000200160009054906101000a90046001600160a01b0316905080888481548110611c0057611c0061214a565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815290879052604090206001018290555b86805480611c4d57611c4d61223a565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038716825287905260408120805460ff191681556001015550505b509392505050565b6001600160a01b03821660009081526020849052604090205460ff161580156116365784548211611ce15760405163b1655e3360e01b815260040160405180910390fd5b6040805180820182526001808252875460208084019182526001600160a01b039790971660008181529888529388209251835460ff19169015151783555191810191909155865490810187559585529290932090930180546001600160a01b0319169091179055919050565b606082471015611dae5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106f0565b600080866001600160a01b03168587604051611dca9190612274565b60006040518083038185875af1925050503d8060008114611e07576040519150601f19603f3d011682016040523d82523d6000602084013e611e0c565b606091505b5091509150611e1d87838387611e28565b979650505050505050565b60608315611e97578251600003611e90576001600160a01b0385163b611e905760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106f0565b5081611636565b6116368383815115611eac5781518083602001fd5b8060405162461bcd60e51b81526004016106f09190612290565b5080546000825560020290600052602060002090810190610efe91905b80821115611efd5760008082556001820155600201611ee3565b5090565b80356001600160a01b0381168114611f1857600080fd5b919050565b600060208284031215611f2f57600080fd5b610a0682611f01565b60006080820186835260208681850152604086818601526080606086015282865180855260a087019150838801945060005b81811015611f8f57855180518452850151858401529484019491830191600101611f6a565b50909a9950505050505050505050565b60008060408385031215611fb257600080fd5b611fbb83611f01565b9150611fc960208401611f01565b90509250929050565b600060208284031215611fe457600080fd5b5035919050565b60008060208385031215611ffe57600080fd5b823567ffffffffffffffff8082111561201657600080fd5b818501915085601f83011261202a57600080fd5b81358181111561203957600080fd5b8660208260051b850101111561204e57600080fd5b60209290920196919550909350505050565b8015158114610efe57600080fd5b6000806040838503121561208157600080fd5b61208a83611f01565b9150602083013561209a81612060565b809150509250929050565b602080825282518282018190526000919060409081850190868401855b828110156120f057815180516001600160a01b031685528601518685015292840192908501906001016120c2565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561213e5783516001600160a01b031683529284019291840191600101612119565b50909695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610f2857610f28612160565b634e487b7160e01b600052604160045260246000fd5b6000600182016121b1576121b1612160565b5060010190565b80820180821115610f2857610f28612160565b6000826121e857634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417610f2857610f28612160565b60006020828403121561221657600080fd5b8151610a0681612060565b60006020828403121561223357600080fd5b5051919050565b634e487b7160e01b600052603160045260246000fd5b60005b8381101561226b578181015183820152602001612253565b50506000910152565b60008251612286818460208701612250565b9190910192915050565b60208152600082518060208401526122af816040850160208701612250565b601f01601f1916919091016040019291505056fe6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6fa2646970667358221220934551d33a0fb26ddad7ebd001df9603a285232fde37e9afced8bb928319765464736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000152e2502c22f73a7493df8b856836efbc69e37180000000000000000000000000000000000000000000000000000000000015180
-----Decoded View---------------
Arg [0] : _lockToken (address): 0x152E2502c22F73a7493df8B856836efBc69E3718
Arg [1] : _lockDuration (uint256): 86400
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000152e2502c22f73a7493df8b856836efbc69e3718
Arg [1] : 0000000000000000000000000000000000000000000000000000000000015180
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.067825 | 681.2307 | $46.2 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.