Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BentLocker
Compiler Version
v0.8.3+commit.8d00100c
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "../libraries/Errors.sol"; import "../interfaces/IBentCVX.sol"; import "../interfaces/IBentPool.sol"; import "../interfaces/IBentPoolManager.sol"; import "../interfaces/convex/IConvexBooster.sol"; import "../interfaces/convex/IBaseRewardPool.sol"; import "../interfaces/convex/IConvexToken.sol"; import "../interfaces/convex/IVirtualBalanceRewardPool.sol"; contract BentLocker is OwnableUpgradeable, ReentrancyGuardUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; // events event Deposit(address indexed user, uint256 amount, uint256 shares); event Withdraw(address indexed user, uint256 amount, uint256 shares); event ClaimAll(address indexed user); event Claim(address indexed user, uint256[] pids); // structs struct PoolData { address rewardToken; uint256 accRewardPerShare; // Accumulated Rewards per share, times 1e36. See below. uint256 rewardRate; uint256 reserves; } struct LockedBalance { uint256 amount; uint256 unlockAt; } struct Epoch { uint256 supply; uint256 startAt; } struct StreamInfo { uint256 windowLength; uint256 endRewardBlock; // end block of rewards stream } IERC20Upgradeable public bent; IBentCVX public bentCVX; uint256 public totalSupply; mapping(address => uint256) public balanceOf; // reward settings uint256 public rewardPoolsCount; mapping(uint256 => PoolData) public rewardPools; mapping(address => bool) public isRewardToken; mapping(uint256 => mapping(address => uint256)) internal userRewardDebt; mapping(uint256 => mapping(address => uint256)) internal userPendingRewards; // lock settings uint256 internal firstEpoch; // first epoch start in week uint256 public epochLength; // 1 weeks uint256 public lockDurationInEpoch; // in lock group = 8 weeks mapping(address => mapping(uint256 => uint256)) public userLocks; // user => epoch => locked balance uint256 lastRewardBlock; // last block of rewards streamed StreamInfo public bentStreamInfo; // only for bentCVX rewards StreamInfo public votiumStreamInfo; // for non-bentCVX rewards function initialize( address _bent, address _bentCVX, address[] memory _rewardTokens, uint256 bentWindowLength, // 7 days uint256 votiumWindowLength, // 15 days uint256 _epochLength, // 1 weeks uint256 _lockDurationInEpoch // in lock group = 8 weeks ) public initializer { __Ownable_init(); __ReentrancyGuard_init(); bent = IERC20Upgradeable(_bent); bentCVX = IBentCVX(_bentCVX); addRewardTokens(_rewardTokens); bentStreamInfo.windowLength = bentWindowLength; votiumStreamInfo.windowLength = votiumWindowLength; epochLength = _epochLength; lockDurationInEpoch = _lockDurationInEpoch; firstEpoch = block.timestamp / epochLength; } function name() external pure returns (string memory) { return "weBENT"; } function decimals() external pure returns (uint256) { return 18; } function addRewardTokens(address[] memory _rewardTokens) public onlyOwner { uint256 length = _rewardTokens.length; for (uint256 i = 0; i < length; i++) { require(!isRewardToken[_rewardTokens[i]], Errors.ALREADY_EXISTS); rewardPools[rewardPoolsCount + i].rewardToken = _rewardTokens[i]; isRewardToken[_rewardTokens[i]] = true; } rewardPoolsCount += length; } function removeRewardToken(uint256 _index) external onlyOwner { require(_index < rewardPoolsCount, Errors.INVALID_INDEX); isRewardToken[rewardPools[_index].rewardToken] = false; delete rewardPools[_index]; } function currentEpoch() public view returns (uint256) { return block.timestamp / epochLength - firstEpoch; } function epochExpireAt(uint256 epoch) public view returns (uint256) { return (firstEpoch + epoch + 1) * epochLength; } function unlockableBalances(address user) public view returns (uint256) { uint256 lastEpoch = currentEpoch(); uint256 fromLockedEpoch = lastEpoch >= lockDurationInEpoch ? lastEpoch - lockDurationInEpoch + 1 : 0; uint256 locked; for (uint256 i = fromLockedEpoch; i <= lastEpoch; i++) { locked += userLocks[user][i]; } return balanceOf[user] - locked; } function lockedBalances(address user) external view returns ( uint256 unlockable, uint256 locked, LockedBalance[] memory lockData ) { uint256 lastEpoch = currentEpoch(); uint256 fromLockedEpoch = lastEpoch >= lockDurationInEpoch ? lastEpoch - lockDurationInEpoch + 1 : 0; lockData = new LockedBalance[](lastEpoch - fromLockedEpoch + 1); for (uint256 i = fromLockedEpoch; i <= lastEpoch; i++) { uint256 amount = userLocks[user][i]; lockData[i - fromLockedEpoch] = LockedBalance( amount, epochExpireAt(i) ); locked += amount; } return (balanceOf[user] - locked, locked, lockData); } function pendingReward(address user) external view returns (uint256[] memory pending) { uint256 _rewardPoolsCount = rewardPoolsCount; pending = new uint256[](_rewardPoolsCount); if (totalSupply != 0) { uint256[] memory addedRewards = _calcAddedRewards(); for (uint256 i = 0; i < _rewardPoolsCount; ++i) { PoolData memory pool = rewardPools[i]; if (pool.rewardToken == address(0)) { continue; } uint256 newAccRewardPerShare = pool.accRewardPerShare + ((addedRewards[i] * 1e36) / totalSupply); pending[i] = userPendingRewards[i][user] + ((balanceOf[user] * newAccRewardPerShare) / 1e36) - userRewardDebt[i][user]; } } } function deposit(uint256 _amount) external nonReentrant { require(_amount != 0, Errors.ZERO_AMOUNT); _updateAccPerShare(true); uint256 shares = _amount; if (totalSupply != 0) { shares = (shares * totalSupply) / bent.balanceOf(address(this)); } bent.safeTransferFrom(msg.sender, address(this), _amount); _mint(msg.sender, shares); _updateUserRewardDebt(); emit Deposit(msg.sender, _amount, shares); } function withdraw(uint256 _shares) external nonReentrant { require( unlockableBalances(msg.sender) >= _shares && _shares != 0, Errors.INVALID_AMOUNT ); _updateAccPerShare(true); uint256 amount = _shares; if (totalSupply != 0) { amount = (amount * bent.balanceOf(address(this))) / totalSupply; } _burn(msg.sender, _shares); // transfer to msg.sender bent.safeTransfer(msg.sender, amount); _updateUserRewardDebt(); emit Withdraw(msg.sender, amount, _shares); } function claimAll() external virtual nonReentrant { _updateAccPerShare(true); bool claimed = false; uint256 _rewardPoolsCount = rewardPoolsCount; for (uint256 i = 0; i < _rewardPoolsCount; ++i) { uint256 claimAmount = _claim(i); if (claimAmount > 0) { claimed = true; } } require(claimed, Errors.NO_PENDING_REWARD); _updateUserRewardDebt(); emit ClaimAll(msg.sender); } function claim(uint256[] memory pids) external nonReentrant { _updateAccPerShare(true); bool claimed = false; for (uint256 i = 0; i < pids.length; ++i) { uint256 claimAmount = _claim(pids[i]); if (claimAmount > 0) { claimed = true; } } require(claimed, Errors.NO_PENDING_REWARD); _updateUserRewardDebt(); emit Claim(msg.sender, pids); } function onReward() external nonReentrant { _updateAccPerShare(false); bool isBentAvaialble = false; bool isVotiumAvailable = false; // stream the rewards for (uint256 i = 0; i < rewardPoolsCount; ++i) { PoolData storage pool = rewardPools[i]; if (pool.rewardToken == address(0)) { continue; } uint256 newRewards = IERC20Upgradeable(pool.rewardToken).balanceOf( address(this) ) - pool.reserves; if (newRewards == 0) { continue; } StreamInfo memory streamInfo = bentStreamInfo; isBentAvaialble = true; if (pool.rewardToken != address(bentCVX)) { streamInfo = votiumStreamInfo; isVotiumAvailable = true; } if (streamInfo.endRewardBlock > lastRewardBlock) { pool.rewardRate = (pool.rewardRate * (streamInfo.endRewardBlock - lastRewardBlock) + newRewards * 1e36) / streamInfo.windowLength; } else { pool.rewardRate = (newRewards * 1e36) / streamInfo.windowLength; } pool.reserves += newRewards; } if (isBentAvaialble) { bentStreamInfo.endRewardBlock = lastRewardBlock + bentStreamInfo.windowLength; } if (isVotiumAvailable) { votiumStreamInfo.endRewardBlock = lastRewardBlock + votiumStreamInfo.windowLength; } } function bentBalanceOf(address user) external view returns (uint256) { if (totalSupply == 0) { return 0; } return (balanceOf[user] * bent.balanceOf(address(this))) / totalSupply; } // Internal Functions function _updateAccPerShare(bool withdrawReward) internal { uint256[] memory addedRewards = _calcAddedRewards(); uint256 _rewardPoolsCount = rewardPoolsCount; for (uint256 i = 0; i < _rewardPoolsCount; ++i) { PoolData storage pool = rewardPools[i]; if (pool.rewardToken == address(0)) { continue; } if (totalSupply == 0) { pool.accRewardPerShare = block.number; } else { pool.accRewardPerShare += (addedRewards[i] * (1e36)) / totalSupply; } if (withdrawReward) { uint256 pending = ((balanceOf[msg.sender] * pool.accRewardPerShare) / 1e36) - userRewardDebt[i][msg.sender]; if (pending > 0) { userPendingRewards[i][msg.sender] += pending; } } } lastRewardBlock = block.number; } function _calcAddedRewards() internal view returns (uint256[] memory addedRewards) { uint256 bentStreamDuration = _calcRewardDuration( bentStreamInfo.windowLength, bentStreamInfo.endRewardBlock ); uint256 votiumStreamDuration = _calcRewardDuration( votiumStreamInfo.windowLength, votiumStreamInfo.endRewardBlock ); uint256 _rewardPoolsCount = rewardPoolsCount; addedRewards = new uint256[](_rewardPoolsCount); for (uint256 i = 0; i < _rewardPoolsCount; ++i) { if (rewardPools[i].rewardToken == address(bentCVX)) { addedRewards[i] = (rewardPools[i].rewardRate * bentStreamDuration) / 1e36; } else { addedRewards[i] = (rewardPools[i].rewardRate * votiumStreamDuration) / 1e36; } } } function _calcRewardDuration(uint256 windowLength, uint256 endRewardBlock) internal view returns (uint256) { uint256 startBlock = endRewardBlock > lastRewardBlock + windowLength ? endRewardBlock - windowLength : lastRewardBlock; uint256 endBlock = block.number > endRewardBlock ? endRewardBlock : block.number; return endBlock > startBlock ? endBlock - startBlock : 0; } function _updateUserRewardDebt() internal { uint256 _rewardPoolsCount = rewardPoolsCount; for (uint256 i = 0; i < _rewardPoolsCount; ++i) { if (rewardPools[i].rewardToken != address(0)) { userRewardDebt[i][msg.sender] = (balanceOf[msg.sender] * rewardPools[i].accRewardPerShare) / 1e36; } } } function _claim(uint256 pid) internal returns (uint256 claimAmount) { claimAmount = userPendingRewards[pid][msg.sender]; if (claimAmount > 0) { IERC20Upgradeable(rewardPools[pid].rewardToken).safeTransfer( msg.sender, claimAmount ); rewardPools[pid].reserves -= claimAmount; userPendingRewards[pid][msg.sender] = 0; } } function _mint(address _user, uint256 _amount) internal { balanceOf[_user] += _amount; totalSupply += _amount; userLocks[_user][currentEpoch()] += _amount; } function _burn(address _user, uint256 _amount) internal { balanceOf[_user] -= _amount; totalSupply -= _amount; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { 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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount ) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable 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( IERC20Upgradeable 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( IERC20Upgradeable 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( IERC20Upgradeable 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)); } } /** * @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(IERC20Upgradeable 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 pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal initializer { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal initializer { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } uint256[49] private __gap; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; library Errors { string public constant ZERO_ADDRESS = "100"; string public constant ZERO_AMOUNT = "101"; string public constant INVALID_ADDRESS = "102"; string public constant INVALID_AMOUNT = "103"; string public constant NO_PENDING_REWARD = "104"; string public constant INVALID_PID = "105"; string public constant INVALID_POOL_ADDRESS = "106"; string public constant UNAUTHORIZED = "107"; string public constant ALREADY_EXISTS = "108"; string public constant SAME_ALLOCPOINT = "109"; string public constant INVALID_REWARD_PER_BLOCK = "110"; string public constant INSUFFICIENT_REWARDS = "111"; string public constant EXCEED_MAX_HARVESTER_FEE = "112"; string public constant EXCEED_MAX_FEE = "113"; string public constant INVALID_INDEX = "114"; string public constant INVALID_REQUEST = "115"; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; interface IBentCVX { function deposit(uint256 _amount) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IBentPool { function lpToken() external view returns (address); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IBentPoolManager { function feeInfo() external view returns ( uint256, address, uint256, address, uint256 ); function rewardToken() external view returns (address); function mint(address user, uint256 cvxAmount) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; interface IConvexBooster { function poolInfo(uint256) external view returns ( address, address, address, address, address, bool ); function deposit( uint256, uint256, bool ) external returns (bool); function depositAll(uint256, bool) external returns (bool); function withdraw(uint256, uint256) external returns (bool); function withdrawAll(uint256) external returns (bool); function rewardClaimed( uint256, address, uint256 ) external returns (bool); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; interface IBaseRewardPool { function getReward(address, bool) external returns (bool); function getReward() external returns (bool); function earned(address) external view returns (uint256); function balanceOf(address) external view returns (uint256); function extraRewards(uint256) external view returns (address); function withdrawAndUnwrap(uint256, bool) external returns (bool); function extraRewardsLength() external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IConvexToken is IERC20 { function reductionPerCliff() external view returns (uint256); function totalCliffs() external view returns (uint256); function maxSupply() external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; interface IVirtualBalanceRewardPool { function getReward(address) external; function getReward() external; function balanceOf(address) external view returns (uint256); function earned(address) external view returns (uint256); function rewardToken() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount ) external returns (bool); /** * @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); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"pids","type":"uint256[]"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"ClaimAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Deposit","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address[]","name":"_rewardTokens","type":"address[]"}],"name":"addRewardTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bent","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"bentBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bentCVX","outputs":[{"internalType":"contract IBentCVX","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bentStreamInfo","outputs":[{"internalType":"uint256","name":"windowLength","type":"uint256"},{"internalType":"uint256","name":"endRewardBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"pids","type":"uint256[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"epochExpireAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bent","type":"address"},{"internalType":"address","name":"_bentCVX","type":"address"},{"internalType":"address[]","name":"_rewardTokens","type":"address[]"},{"internalType":"uint256","name":"bentWindowLength","type":"uint256"},{"internalType":"uint256","name":"votiumWindowLength","type":"uint256"},{"internalType":"uint256","name":"_epochLength","type":"uint256"},{"internalType":"uint256","name":"_lockDurationInEpoch","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isRewardToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockDurationInEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"lockedBalances","outputs":[{"internalType":"uint256","name":"unlockable","type":"uint256"},{"internalType":"uint256","name":"locked","type":"uint256"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"unlockAt","type":"uint256"}],"internalType":"struct BentLocker.LockedBalance[]","name":"lockData","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"onReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"pendingReward","outputs":[{"internalType":"uint256[]","name":"pending","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"removeRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardPools","outputs":[{"internalType":"address","name":"rewardToken","type":"address"},{"internalType":"uint256","name":"accRewardPerShare","type":"uint256"},{"internalType":"uint256","name":"rewardRate","type":"uint256"},{"internalType":"uint256","name":"reserves","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPoolsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"unlockableBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userLocks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votiumStreamInfo","outputs":[{"internalType":"uint256","name":"windowLength","type":"uint256"},{"internalType":"uint256","name":"endRewardBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506129b1806100206000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c8063793448551161010f578063b49b35f5116100a2578063c365388411610071578063c3653884146104a2578063d1058e59146104b5578063f2fde38b146104bd578063f40f0f52146104d0576101e5565b8063b49b35f514610440578063b5fd73f814610449578063b6b55f251461047c578063ba349c5a1461048f576101e5565b8063a1f87809116100de578063a1f87809146103dc578063a3a6124d146103ef578063aa33fedb14610402578063b3b7f9431461042d576101e5565b8063793448551461037e5780638da5cb5b14610386578063963c7135146103ab5780639fc2c3b6146103ce576101e5565b806357d775f811610187578063715018a611610156578063715018a614610348578063723c3dde14610350578063766718081461036357806376826fe41461036b576101e5565b806357d775f8146102f9578063671f49bb146103025780636ba4c1381461031557806370a0823114610328576101e5565b806318160ddd116101c357806318160ddd1461026b5780632e1a7d4d14610274578063313ce5671461028957806346abf39114610290576101e5565b80630483a7f6146101ea57806306fdde0314610215578063153a721614610254575b600080fd5b6101fd6101f8366004612571565b6104f0565b60405161020c939291906127e6565b60405180910390f35b604080518082018252600681527f776542454e5400000000000000000000000000000000000000000000000000006020820152905161020c91906127b3565b61025d609b5481565b60405190815260200161020c565b61025d60995481565b610287610282366004612723565b61067d565b005b601261025d565b6102cf61029e366004612723565b609c6020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909184565b604080516001600160a01b039095168552602085019390935291830152606082015260800161020c565b61025d60a15481565b61025d610310366004612571565b61085d565b610287610323366004612670565b610914565b61025d610336366004612571565b609a6020526000908152604090205481565b610287610a4e565b61025d61035e366004612723565b610ab4565b61025d610ae2565b61028761037936600461258b565b610b04565b610287610c35565b6033546001600160a01b03165b6040516001600160a01b03909116815260200161020c565b60a75460a8546103b9919082565b6040805192835260208301919091520161020c565b60a55460a6546103b9919082565b6102876103ea366004612635565b610eb0565b61025d6103fd366004612571565b6110bc565b61025d61041036600461260c565b60a360209081526000928352604080842090915290825290205481565b609754610393906001600160a01b031681565b61025d60a25481565b61046c610457366004612571565b609d6020526000908152604090205460ff1681565b604051901515815260200161020c565b61028761048a366004612723565b61117c565b61028761049d366004612723565b611332565b609854610393906001600160a01b031681565b610287611448565b6102876104cb366004612571565b611559565b6104e36104de366004612571565b61163b565b60405161020c919061276f565b600080606060006104ff610ae2565b9050600060a25482101561051457600061052c565b60a25461052190836128f1565b61052c90600161289a565b905061053881836128f1565b61054390600161289a565b67ffffffffffffffff81111561056957634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156105ae57816020015b60408051808201909152600080825260208201528152602001906001900390816105875790505b509250805b82811161064d576001600160a01b038716600090815260a360209081526040808320848452825291829020548251808401909352808352919081016105f784610ab4565b90528561060485856128f1565b8151811061062257634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610637818761289a565b955050808061064590612934565b9150506105b3565b506001600160a01b0386166000908152609a60205260409020546106729085906128f1565b945050509193909250565b600260655414156106d55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002606555806106e43361085d565b101580156106f157508015155b6040518060400160405280600381526020017f3130330000000000000000000000000000000000000000000000000000000000815250906107455760405162461bcd60e51b81526004016106cc91906127b3565b50610750600161183d565b6099548190156107ef576099546097546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156107a057600080fd5b505afa1580156107b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d8919061273b565b6107e290836128d2565b6107ec91906128b2565b90505b6107f933836119a9565b609754610810906001600160a01b031633836119ea565b610818611a98565b604080518281526020810184905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56891015b60405180910390a250506001606555565b600080610868610ae2565b9050600060a25482101561087d576000610895565b60a25461088a90836128f1565b61089590600161289a565b90506000815b8381116108e4576001600160a01b038616600090815260a3602090815260408083208484529091529020546108d0908361289a565b9150806108dc81612934565b91505061089b565b506001600160a01b0385166000908152609a60205260409020546109099082906128f1565b93505050505b919050565b600260655414156109675760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cc565b6002606555610976600161183d565b6000805b82518110156109d35760006109b58483815181106109a857634e487b7160e01b600052603260045260246000fd5b6020026020010151611b37565b905080156109c257600192505b506109cc81612934565b905061097a565b506040805180820190915260038152620c4c0d60ea1b602082015281610a0c5760405162461bcd60e51b81526004016106cc91906127b3565b50610a15611a98565b336001600160a01b03167f62e5026cd9fe3da2857a32843590ee91bb903ce20cfd623f97b7f1ba9f2cb6d88360405161084c919061276f565b6033546001600160a01b03163314610aa85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106cc565b610ab26000611bbf565b565b600060a1548260a054610ac7919061289a565b610ad290600161289a565b610adc91906128d2565b92915050565b600060a05460a15442610af591906128b2565b610aff91906128f1565b905090565b600054610100900460ff1680610b1d575060005460ff16155b610b805760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106cc565b600054610100900460ff16158015610ba2576000805461ffff19166101011790555b610baa611c1e565b610bb2611ce0565b609780546001600160a01b03808b1673ffffffffffffffffffffffffffffffffffffffff199283161790925560988054928a1692909116919091179055610bf886610eb0565b60a585905560a784905560a183905560a2829055610c1683426128b2565b60a0558015610c2b576000805461ff00191690555b5050505050505050565b60026065541415610c885760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cc565b6002606555610c97600061183d565b60008060005b609b54811015610e72576000818152609c6020526040902080546001600160a01b0316610cca5750610e62565b600381015481546040516370a0823160e01b8152306004820152600092916001600160a01b0316906370a082319060240160206040518083038186803b158015610d1357600080fd5b505afa158015610d27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4b919061273b565b610d5591906128f1565b905080610d63575050610e62565b6040805180820190915260a554815260a65460208201526098548354600197506001600160a01b03908116911614610db257506040805180820190915260a754815260a8546020820152600194505b60a45481602001511115610e1a578051610ddb836ec097ce7bc90715b34b9f10000000006128d2565b60a4548360200151610ded91906128f1565b8560020154610dfc91906128d2565b610e06919061289a565b610e1091906128b2565b6002840155610e45565b8051610e35836ec097ce7bc90715b34b9f10000000006128d2565b610e3f91906128b2565b60028401555b81836003016000828254610e59919061289a565b90915550505050505b610e6b81612934565b9050610c9d565b508115610e8d5760a55460a454610e89919061289a565b60a6555b8015610ea75760a75460a454610ea3919061289a565b60a8555b50506001606555565b6033546001600160a01b03163314610f0a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106cc565b805160005b818110156110a057609d6000848381518110610f3b57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a900460ff16156040518060400160405280600381526020017f313038000000000000000000000000000000000000000000000000000000000081525090610fc65760405162461bcd60e51b81526004016106cc91906127b3565b50828181518110610fe757634e487b7160e01b600052603260045260246000fd5b6020026020010151609c600083609b54611001919061289a565b815260200190815260200160002060000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609d600085848151811061105c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061109881612934565b915050610f0f565b5080609b60008282546110b3919061289a565b90915550505050565b6000609954600014156110d15750600061090f565b6099546097546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561111757600080fd5b505afa15801561112b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114f919061273b565b6001600160a01b0384166000908152609a602052604090205461117291906128d2565b610adc91906128b2565b600260655414156111cf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cc565b600260655560408051808201909152600381527f31303100000000000000000000000000000000000000000000000000000000006020820152816112265760405162461bcd60e51b81526004016106cc91906127b3565b50611231600161183d565b6099548190156112d0576097546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561127e57600080fd5b505afa158015611292573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b6919061273b565b6099546112c390836128d2565b6112cd91906128b2565b90505b6097546112e8906001600160a01b0316333085611d86565b6112f23382611ddd565b6112fa611a98565b604080518381526020810183905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910161084c565b6033546001600160a01b0316331461138c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106cc565b609b5481106040518060400160405280600381526020017f3131340000000000000000000000000000000000000000000000000000000000815250906113e55760405162461bcd60e51b81526004016106cc91906127b3565b506000818152609c6020818152604080842080546001600160a01b03168552609d8352908420805460ff1916905593835252815473ffffffffffffffffffffffffffffffffffffffff191682556001820181905560028201819055600390910155565b6002606554141561149b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cc565b60026065556114aa600161183d565b609b54600090815b818110156114e35760006114c582611b37565b905080156114d257600193505b506114dc81612934565b90506114b2565b506040805180820190915260038152620c4c0d60ea1b60208201528261151c5760405162461bcd60e51b81526004016106cc91906127b3565b50611525611a98565b60405133907f35c46ad0a3be0baa9f2efefd524536899a004933e4fd4c13a81a0e1a38f5511590600090a250506001606555565b6033546001600160a01b031633146115b35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106cc565b6001600160a01b03811661162f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016106cc565b61163881611bbf565b50565b609b546060908067ffffffffffffffff81111561166857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611691578160200160208202803683370190505b5091506099546000146118375760006116a8611e62565b905060005b82811015611834576000818152609c6020908152604091829020825160808101845281546001600160a01b03168082526001830154938201939093526002820154938101939093526003015460608301526117085750611824565b600060995484848151811061172d57634e487b7160e01b600052603260045260246000fd5b60200260200101516ec097ce7bc90715b34b9f100000000061174f91906128d2565b61175991906128b2565b8260200151611768919061289a565b6000848152609e602090815260408083206001600160a01b038c168452825280832054609a90925290912054919250906ec097ce7bc90715b34b9f1000000000906117b49084906128d2565b6117be91906128b2565b6000858152609f602090815260408083206001600160a01b038d1684529091529020546117eb919061289a565b6117f591906128f1565b86848151811061181557634e487b7160e01b600052603260045260246000fd5b60200260200101818152505050505b61182d81612934565b90506116ad565b50505b50919050565b6000611847611e62565b609b5490915060005b8181101561199f576000818152609c6020526040902080546001600160a01b031661187b575061198f565b60995461188d574360018201556118f5565b6099548483815181106118b057634e487b7160e01b600052603260045260246000fd5b60200260200101516ec097ce7bc90715b34b9f10000000006118d291906128d2565b6118dc91906128b2565b8160010160008282546118ef919061289a565b90915550505b841561198d576000828152609e602090815260408083203384528252808320546001850154609a9093529083205490916ec097ce7bc90715b34b9f10000000009161194091906128d2565b61194a91906128b2565b61195491906128f1565b9050801561198b576000838152609f602090815260408083203384529091528120805483929061198590849061289a565b90915550505b505b505b61199881612934565b9050611850565b50504360a4555050565b6001600160a01b0382166000908152609a6020526040812080548392906119d19084906128f1565b9250508190555080609960008282546110b391906128f1565b6040516001600160a01b038316602482015260448101829052611a939084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612000565b505050565b609b5460005b81811015611b33576000818152609c60205260409020546001600160a01b031615611b23576000818152609c6020908152604080832060010154338452609a909252909120546ec097ce7bc90715b34b9f100000000091611afe916128d2565b611b0891906128b2565b6000828152609e602090815260408083203384529091529020555b611b2c81612934565b9050611a9e565b5050565b6000818152609f60209081526040808320338452909152902054801561090f576000828152609c6020526040902054611b7a906001600160a01b031633836119ea565b6000828152609c602052604081206003018054839290611b9b9084906128f1565b90915550506000828152609f60209081526040808320338452909152812055919050565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1680611c37575060005460ff16155b611c9a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106cc565b600054610100900460ff16158015611cbc576000805461ffff19166101011790555b611cc46120e5565b611ccc612196565b8015611638576000805461ff001916905550565b600054610100900460ff1680611cf9575060005460ff16155b611d5c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106cc565b600054610100900460ff16158015611d7e576000805461ffff19166101011790555b611ccc61223d565b6040516001600160a01b0380851660248301528316604482015260648101829052611dd79085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611a2f565b50505050565b6001600160a01b0382166000908152609a602052604081208054839290611e0590849061289a565b925050819055508060996000828254611e1e919061289a565b90915550506001600160a01b038216600090815260a3602052604081208291611e45610ae2565b815260200190815260200160002060008282546110b3919061289a565b60606000611e7a60a56000015460a5600101546122f4565b90506000611e9260a76000015460a7600101546122f4565b609b549091508067ffffffffffffffff811115611ebf57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611ee8578160200160208202803683370190505b50935060005b81811015611ff9576098546000828152609c60205260409020546001600160a01b0390811691161415611f84576000818152609c60205260409020600201546ec097ce7bc90715b34b9f100000000090611f499086906128d2565b611f5391906128b2565b858281518110611f7357634e487b7160e01b600052603260045260246000fd5b602002602001018181525050611fe9565b6000818152609c60205260409020600201546ec097ce7bc90715b34b9f100000000090611fb29085906128d2565b611fbc91906128b2565b858281518110611fdc57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b611ff281612934565b9050611eee565b5050505090565b6000612055826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123539092919063ffffffff16565b805190915015611a9357808060200190518101906120739190612703565b611a935760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106cc565b600054610100900460ff16806120fe575060005460ff16155b6121615760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106cc565b600054610100900460ff16158015611ccc576000805461ffff19166101011790558015611638576000805461ff001916905550565b600054610100900460ff16806121af575060005460ff16155b6122125760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106cc565b600054610100900460ff16158015612234576000805461ffff19166101011790555b611ccc33611bbf565b600054610100900460ff1680612256575060005460ff16155b6122b95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106cc565b600054610100900460ff161580156122db576000805461ffff19166101011790555b60016065558015611638576000805461ff001916905550565b6000808360a454612305919061289a565b83116123135760a45461231d565b61231d84846128f1565b9050600083431161232e5743612330565b835b905081811161234057600061234a565b61234a82826128f1565b95945050505050565b6060612362848460008561236c565b90505b9392505050565b6060824710156123e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106cc565b843b6124325760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106cc565b600080866001600160a01b0316858760405161244e9190612753565b60006040518083038185875af1925050503d806000811461248b576040519150601f19603f3d011682016040523d82523d6000602084013e612490565b606091505b50915091506124a08282866124ab565b979650505050505050565b606083156124ba575081612365565b8251156124ca5782518084602001fd5b8160405162461bcd60e51b81526004016106cc91906127b3565b80356001600160a01b038116811461090f57600080fd5b600082601f83011261250b578081fd5b8135602061252061251b83612876565b612845565b80838252828201915082860187848660051b890101111561253f578586fd5b855b8581101561256457612552826124e4565b84529284019290840190600101612541565b5090979650505050505050565b600060208284031215612582578081fd5b612365826124e4565b600080600080600080600060e0888a0312156125a5578283fd5b6125ae886124e4565b96506125bc602089016124e4565b9550604088013567ffffffffffffffff8111156125d7578384fd5b6125e38a828b016124fb565b979a96995096976060810135975060808101359660a0820135965060c090910135945092505050565b6000806040838503121561261e578182fd5b612627836124e4565b946020939093013593505050565b600060208284031215612646578081fd5b813567ffffffffffffffff81111561265c578182fd5b612668848285016124fb565b949350505050565b60006020808385031215612682578182fd5b823567ffffffffffffffff811115612698578283fd5b8301601f810185136126a8578283fd5b80356126b661251b82612876565b80828252848201915084840188868560051b87010111156126d5578687fd5b8694505b838510156126f75780358352600194909401939185019185016126d9565b50979650505050505050565b600060208284031215612714578081fd5b81518015158114612365578182fd5b600060208284031215612734578081fd5b5035919050565b60006020828403121561274c578081fd5b5051919050565b60008251612765818460208701612908565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156127a75783518352928401929184019160010161278b565b50909695505050505050565b60006020825282518060208401526127d2816040850160208701612908565b601f01601f19169190910160400192915050565b6000606082018583526020858185015260406060818601528286518085526080870191508388019450855b8181101561283657855180518452850151858401529484019491830191600101612811565b50909998505050505050505050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561286e5761286e612965565b604052919050565b600067ffffffffffffffff82111561289057612890612965565b5060051b60200190565b600082198211156128ad576128ad61294f565b500190565b6000826128cd57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156128ec576128ec61294f565b500290565b6000828210156129035761290361294f565b500390565b60005b8381101561292357818101518382015260200161290b565b83811115611dd75750506000910152565b60006000198214156129485761294861294f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212203bdaef5a193903d8ecf99aa92bc951c4496e5729a4ba96e067bb87baa937ab9664736f6c63430008030033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101e55760003560e01c8063793448551161010f578063b49b35f5116100a2578063c365388411610071578063c3653884146104a2578063d1058e59146104b5578063f2fde38b146104bd578063f40f0f52146104d0576101e5565b8063b49b35f514610440578063b5fd73f814610449578063b6b55f251461047c578063ba349c5a1461048f576101e5565b8063a1f87809116100de578063a1f87809146103dc578063a3a6124d146103ef578063aa33fedb14610402578063b3b7f9431461042d576101e5565b8063793448551461037e5780638da5cb5b14610386578063963c7135146103ab5780639fc2c3b6146103ce576101e5565b806357d775f811610187578063715018a611610156578063715018a614610348578063723c3dde14610350578063766718081461036357806376826fe41461036b576101e5565b806357d775f8146102f9578063671f49bb146103025780636ba4c1381461031557806370a0823114610328576101e5565b806318160ddd116101c357806318160ddd1461026b5780632e1a7d4d14610274578063313ce5671461028957806346abf39114610290576101e5565b80630483a7f6146101ea57806306fdde0314610215578063153a721614610254575b600080fd5b6101fd6101f8366004612571565b6104f0565b60405161020c939291906127e6565b60405180910390f35b604080518082018252600681527f776542454e5400000000000000000000000000000000000000000000000000006020820152905161020c91906127b3565b61025d609b5481565b60405190815260200161020c565b61025d60995481565b610287610282366004612723565b61067d565b005b601261025d565b6102cf61029e366004612723565b609c6020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909184565b604080516001600160a01b039095168552602085019390935291830152606082015260800161020c565b61025d60a15481565b61025d610310366004612571565b61085d565b610287610323366004612670565b610914565b61025d610336366004612571565b609a6020526000908152604090205481565b610287610a4e565b61025d61035e366004612723565b610ab4565b61025d610ae2565b61028761037936600461258b565b610b04565b610287610c35565b6033546001600160a01b03165b6040516001600160a01b03909116815260200161020c565b60a75460a8546103b9919082565b6040805192835260208301919091520161020c565b60a55460a6546103b9919082565b6102876103ea366004612635565b610eb0565b61025d6103fd366004612571565b6110bc565b61025d61041036600461260c565b60a360209081526000928352604080842090915290825290205481565b609754610393906001600160a01b031681565b61025d60a25481565b61046c610457366004612571565b609d6020526000908152604090205460ff1681565b604051901515815260200161020c565b61028761048a366004612723565b61117c565b61028761049d366004612723565b611332565b609854610393906001600160a01b031681565b610287611448565b6102876104cb366004612571565b611559565b6104e36104de366004612571565b61163b565b60405161020c919061276f565b600080606060006104ff610ae2565b9050600060a25482101561051457600061052c565b60a25461052190836128f1565b61052c90600161289a565b905061053881836128f1565b61054390600161289a565b67ffffffffffffffff81111561056957634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156105ae57816020015b60408051808201909152600080825260208201528152602001906001900390816105875790505b509250805b82811161064d576001600160a01b038716600090815260a360209081526040808320848452825291829020548251808401909352808352919081016105f784610ab4565b90528561060485856128f1565b8151811061062257634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610637818761289a565b955050808061064590612934565b9150506105b3565b506001600160a01b0386166000908152609a60205260409020546106729085906128f1565b945050509193909250565b600260655414156106d55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002606555806106e43361085d565b101580156106f157508015155b6040518060400160405280600381526020017f3130330000000000000000000000000000000000000000000000000000000000815250906107455760405162461bcd60e51b81526004016106cc91906127b3565b50610750600161183d565b6099548190156107ef576099546097546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156107a057600080fd5b505afa1580156107b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d8919061273b565b6107e290836128d2565b6107ec91906128b2565b90505b6107f933836119a9565b609754610810906001600160a01b031633836119ea565b610818611a98565b604080518281526020810184905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56891015b60405180910390a250506001606555565b600080610868610ae2565b9050600060a25482101561087d576000610895565b60a25461088a90836128f1565b61089590600161289a565b90506000815b8381116108e4576001600160a01b038616600090815260a3602090815260408083208484529091529020546108d0908361289a565b9150806108dc81612934565b91505061089b565b506001600160a01b0385166000908152609a60205260409020546109099082906128f1565b93505050505b919050565b600260655414156109675760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cc565b6002606555610976600161183d565b6000805b82518110156109d35760006109b58483815181106109a857634e487b7160e01b600052603260045260246000fd5b6020026020010151611b37565b905080156109c257600192505b506109cc81612934565b905061097a565b506040805180820190915260038152620c4c0d60ea1b602082015281610a0c5760405162461bcd60e51b81526004016106cc91906127b3565b50610a15611a98565b336001600160a01b03167f62e5026cd9fe3da2857a32843590ee91bb903ce20cfd623f97b7f1ba9f2cb6d88360405161084c919061276f565b6033546001600160a01b03163314610aa85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106cc565b610ab26000611bbf565b565b600060a1548260a054610ac7919061289a565b610ad290600161289a565b610adc91906128d2565b92915050565b600060a05460a15442610af591906128b2565b610aff91906128f1565b905090565b600054610100900460ff1680610b1d575060005460ff16155b610b805760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106cc565b600054610100900460ff16158015610ba2576000805461ffff19166101011790555b610baa611c1e565b610bb2611ce0565b609780546001600160a01b03808b1673ffffffffffffffffffffffffffffffffffffffff199283161790925560988054928a1692909116919091179055610bf886610eb0565b60a585905560a784905560a183905560a2829055610c1683426128b2565b60a0558015610c2b576000805461ff00191690555b5050505050505050565b60026065541415610c885760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cc565b6002606555610c97600061183d565b60008060005b609b54811015610e72576000818152609c6020526040902080546001600160a01b0316610cca5750610e62565b600381015481546040516370a0823160e01b8152306004820152600092916001600160a01b0316906370a082319060240160206040518083038186803b158015610d1357600080fd5b505afa158015610d27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4b919061273b565b610d5591906128f1565b905080610d63575050610e62565b6040805180820190915260a554815260a65460208201526098548354600197506001600160a01b03908116911614610db257506040805180820190915260a754815260a8546020820152600194505b60a45481602001511115610e1a578051610ddb836ec097ce7bc90715b34b9f10000000006128d2565b60a4548360200151610ded91906128f1565b8560020154610dfc91906128d2565b610e06919061289a565b610e1091906128b2565b6002840155610e45565b8051610e35836ec097ce7bc90715b34b9f10000000006128d2565b610e3f91906128b2565b60028401555b81836003016000828254610e59919061289a565b90915550505050505b610e6b81612934565b9050610c9d565b508115610e8d5760a55460a454610e89919061289a565b60a6555b8015610ea75760a75460a454610ea3919061289a565b60a8555b50506001606555565b6033546001600160a01b03163314610f0a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106cc565b805160005b818110156110a057609d6000848381518110610f3b57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a900460ff16156040518060400160405280600381526020017f313038000000000000000000000000000000000000000000000000000000000081525090610fc65760405162461bcd60e51b81526004016106cc91906127b3565b50828181518110610fe757634e487b7160e01b600052603260045260246000fd5b6020026020010151609c600083609b54611001919061289a565b815260200190815260200160002060000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609d600085848151811061105c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061109881612934565b915050610f0f565b5080609b60008282546110b3919061289a565b90915550505050565b6000609954600014156110d15750600061090f565b6099546097546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561111757600080fd5b505afa15801561112b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114f919061273b565b6001600160a01b0384166000908152609a602052604090205461117291906128d2565b610adc91906128b2565b600260655414156111cf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cc565b600260655560408051808201909152600381527f31303100000000000000000000000000000000000000000000000000000000006020820152816112265760405162461bcd60e51b81526004016106cc91906127b3565b50611231600161183d565b6099548190156112d0576097546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561127e57600080fd5b505afa158015611292573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b6919061273b565b6099546112c390836128d2565b6112cd91906128b2565b90505b6097546112e8906001600160a01b0316333085611d86565b6112f23382611ddd565b6112fa611a98565b604080518381526020810183905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910161084c565b6033546001600160a01b0316331461138c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106cc565b609b5481106040518060400160405280600381526020017f3131340000000000000000000000000000000000000000000000000000000000815250906113e55760405162461bcd60e51b81526004016106cc91906127b3565b506000818152609c6020818152604080842080546001600160a01b03168552609d8352908420805460ff1916905593835252815473ffffffffffffffffffffffffffffffffffffffff191682556001820181905560028201819055600390910155565b6002606554141561149b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cc565b60026065556114aa600161183d565b609b54600090815b818110156114e35760006114c582611b37565b905080156114d257600193505b506114dc81612934565b90506114b2565b506040805180820190915260038152620c4c0d60ea1b60208201528261151c5760405162461bcd60e51b81526004016106cc91906127b3565b50611525611a98565b60405133907f35c46ad0a3be0baa9f2efefd524536899a004933e4fd4c13a81a0e1a38f5511590600090a250506001606555565b6033546001600160a01b031633146115b35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106cc565b6001600160a01b03811661162f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016106cc565b61163881611bbf565b50565b609b546060908067ffffffffffffffff81111561166857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611691578160200160208202803683370190505b5091506099546000146118375760006116a8611e62565b905060005b82811015611834576000818152609c6020908152604091829020825160808101845281546001600160a01b03168082526001830154938201939093526002820154938101939093526003015460608301526117085750611824565b600060995484848151811061172d57634e487b7160e01b600052603260045260246000fd5b60200260200101516ec097ce7bc90715b34b9f100000000061174f91906128d2565b61175991906128b2565b8260200151611768919061289a565b6000848152609e602090815260408083206001600160a01b038c168452825280832054609a90925290912054919250906ec097ce7bc90715b34b9f1000000000906117b49084906128d2565b6117be91906128b2565b6000858152609f602090815260408083206001600160a01b038d1684529091529020546117eb919061289a565b6117f591906128f1565b86848151811061181557634e487b7160e01b600052603260045260246000fd5b60200260200101818152505050505b61182d81612934565b90506116ad565b50505b50919050565b6000611847611e62565b609b5490915060005b8181101561199f576000818152609c6020526040902080546001600160a01b031661187b575061198f565b60995461188d574360018201556118f5565b6099548483815181106118b057634e487b7160e01b600052603260045260246000fd5b60200260200101516ec097ce7bc90715b34b9f10000000006118d291906128d2565b6118dc91906128b2565b8160010160008282546118ef919061289a565b90915550505b841561198d576000828152609e602090815260408083203384528252808320546001850154609a9093529083205490916ec097ce7bc90715b34b9f10000000009161194091906128d2565b61194a91906128b2565b61195491906128f1565b9050801561198b576000838152609f602090815260408083203384529091528120805483929061198590849061289a565b90915550505b505b505b61199881612934565b9050611850565b50504360a4555050565b6001600160a01b0382166000908152609a6020526040812080548392906119d19084906128f1565b9250508190555080609960008282546110b391906128f1565b6040516001600160a01b038316602482015260448101829052611a939084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612000565b505050565b609b5460005b81811015611b33576000818152609c60205260409020546001600160a01b031615611b23576000818152609c6020908152604080832060010154338452609a909252909120546ec097ce7bc90715b34b9f100000000091611afe916128d2565b611b0891906128b2565b6000828152609e602090815260408083203384529091529020555b611b2c81612934565b9050611a9e565b5050565b6000818152609f60209081526040808320338452909152902054801561090f576000828152609c6020526040902054611b7a906001600160a01b031633836119ea565b6000828152609c602052604081206003018054839290611b9b9084906128f1565b90915550506000828152609f60209081526040808320338452909152812055919050565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1680611c37575060005460ff16155b611c9a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106cc565b600054610100900460ff16158015611cbc576000805461ffff19166101011790555b611cc46120e5565b611ccc612196565b8015611638576000805461ff001916905550565b600054610100900460ff1680611cf9575060005460ff16155b611d5c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106cc565b600054610100900460ff16158015611d7e576000805461ffff19166101011790555b611ccc61223d565b6040516001600160a01b0380851660248301528316604482015260648101829052611dd79085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611a2f565b50505050565b6001600160a01b0382166000908152609a602052604081208054839290611e0590849061289a565b925050819055508060996000828254611e1e919061289a565b90915550506001600160a01b038216600090815260a3602052604081208291611e45610ae2565b815260200190815260200160002060008282546110b3919061289a565b60606000611e7a60a56000015460a5600101546122f4565b90506000611e9260a76000015460a7600101546122f4565b609b549091508067ffffffffffffffff811115611ebf57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611ee8578160200160208202803683370190505b50935060005b81811015611ff9576098546000828152609c60205260409020546001600160a01b0390811691161415611f84576000818152609c60205260409020600201546ec097ce7bc90715b34b9f100000000090611f499086906128d2565b611f5391906128b2565b858281518110611f7357634e487b7160e01b600052603260045260246000fd5b602002602001018181525050611fe9565b6000818152609c60205260409020600201546ec097ce7bc90715b34b9f100000000090611fb29085906128d2565b611fbc91906128b2565b858281518110611fdc57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b611ff281612934565b9050611eee565b5050505090565b6000612055826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123539092919063ffffffff16565b805190915015611a9357808060200190518101906120739190612703565b611a935760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106cc565b600054610100900460ff16806120fe575060005460ff16155b6121615760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106cc565b600054610100900460ff16158015611ccc576000805461ffff19166101011790558015611638576000805461ff001916905550565b600054610100900460ff16806121af575060005460ff16155b6122125760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106cc565b600054610100900460ff16158015612234576000805461ffff19166101011790555b611ccc33611bbf565b600054610100900460ff1680612256575060005460ff16155b6122b95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106cc565b600054610100900460ff161580156122db576000805461ffff19166101011790555b60016065558015611638576000805461ff001916905550565b6000808360a454612305919061289a565b83116123135760a45461231d565b61231d84846128f1565b9050600083431161232e5743612330565b835b905081811161234057600061234a565b61234a82826128f1565b95945050505050565b6060612362848460008561236c565b90505b9392505050565b6060824710156123e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106cc565b843b6124325760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106cc565b600080866001600160a01b0316858760405161244e9190612753565b60006040518083038185875af1925050503d806000811461248b576040519150601f19603f3d011682016040523d82523d6000602084013e612490565b606091505b50915091506124a08282866124ab565b979650505050505050565b606083156124ba575081612365565b8251156124ca5782518084602001fd5b8160405162461bcd60e51b81526004016106cc91906127b3565b80356001600160a01b038116811461090f57600080fd5b600082601f83011261250b578081fd5b8135602061252061251b83612876565b612845565b80838252828201915082860187848660051b890101111561253f578586fd5b855b8581101561256457612552826124e4565b84529284019290840190600101612541565b5090979650505050505050565b600060208284031215612582578081fd5b612365826124e4565b600080600080600080600060e0888a0312156125a5578283fd5b6125ae886124e4565b96506125bc602089016124e4565b9550604088013567ffffffffffffffff8111156125d7578384fd5b6125e38a828b016124fb565b979a96995096976060810135975060808101359660a0820135965060c090910135945092505050565b6000806040838503121561261e578182fd5b612627836124e4565b946020939093013593505050565b600060208284031215612646578081fd5b813567ffffffffffffffff81111561265c578182fd5b612668848285016124fb565b949350505050565b60006020808385031215612682578182fd5b823567ffffffffffffffff811115612698578283fd5b8301601f810185136126a8578283fd5b80356126b661251b82612876565b80828252848201915084840188868560051b87010111156126d5578687fd5b8694505b838510156126f75780358352600194909401939185019185016126d9565b50979650505050505050565b600060208284031215612714578081fd5b81518015158114612365578182fd5b600060208284031215612734578081fd5b5035919050565b60006020828403121561274c578081fd5b5051919050565b60008251612765818460208701612908565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156127a75783518352928401929184019160010161278b565b50909695505050505050565b60006020825282518060208401526127d2816040850160208701612908565b601f01601f19169190910160400192915050565b6000606082018583526020858185015260406060818601528286518085526080870191508388019450855b8181101561283657855180518452850151858401529484019491830191600101612811565b50909998505050505050505050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561286e5761286e612965565b604052919050565b600067ffffffffffffffff82111561289057612890612965565b5060051b60200190565b600082198211156128ad576128ad61294f565b500190565b6000826128cd57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156128ec576128ec61294f565b500290565b6000828210156129035761290361294f565b500390565b60005b8381101561292357818101518382015260200161290b565b83811115611dd75750506000910152565b60006000198214156129485761294861294f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212203bdaef5a193903d8ecf99aa92bc951c4496e5729a4ba96e067bb87baa937ab9664736f6c63430008030033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.