Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
TimeLock
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.0; import "./IERC20Decimals.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol"; contract TimeLock is Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable { using SafeMathUpgradeable for uint256; using SafeERC20Upgradeable for IERC20Decimals; address public wallet; uint256 public percent; uint256 public poolsCount; uint256 public minimalDepositAmount; poolName[] poolNamesArray; IERC20Decimals token; mapping(string => mapping(address => LockBoxStruct[])) public boxPool; mapping(string => poolData) public poolLockTime; mapping(address => bool) public managers; mapping(address => bool) public allowedBuyTokens; struct LockBoxStruct { address beneficiary; uint256 total; uint256 balance; uint256 payed; uint256 depositTime; uint256 periodsPassed; } struct poolData { string name; uint256 lockPeriod; uint256 periodLength; uint256 periodsNumber; uint256 percent; bool exists; uint256 startTime; uint256 cap; uint256 ratio; uint8 status; uint256 deposited; uint256 withdrawn; } struct bulkDeposit { address beneficiary; uint256 amount; } struct poolName { string name; } event LogLockBoxDeposit( address sender, uint256 amount, address stable, uint256 releaseTime, string pool, uint256 ratio ); event LogLockBoxWithdrawal(address receiver, uint256 amount); event PoolAdded(string name); event UpdateManager(address manager, bool status); modifier onlyManager() { require(managers[msg.sender], "Only manager can call this function"); _; } /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } receive() external payable {} fallback() external payable {} function initialize(address _wallet) public initializer { __ReentrancyGuard_init(); __Ownable_init(); wallet = _wallet; percent = 1000000; managers[msg.sender] = true; } function setToken(address _token) external onlyOwner { require(address(_token) != address(0), "Zero address not allowed"); token = IERC20Decimals(_token); } function setWallet(address _wallet) external onlyOwner { require(address(_wallet) != address(0), "Zero address not allowed"); wallet = _wallet; } function setBuyToken(address _token, bool _status) external onlyOwner { require(_token != address(0), "PrivateStaking: invalid token address"); allowedBuyTokens[_token] = _status; } function setManager(address _manager, bool _status) external onlyOwner { require( _manager != address(0), "PrivateStaking: invalid manager address" ); managers[_manager] = _status; emit UpdateManager(_manager, _status); } function setMinimalDepositAmount(uint256 _amount) external onlyOwner { minimalDepositAmount = _amount; } function setPoolStatus( string calldata _poolName, uint8 _status ) external onlyManager { require(poolLockTime[_poolName].exists, "Pool: not exists"); require(_status == 0 || _status == 1 || _status == 2, "Wrong status"); poolLockTime[_poolName].status = _status; } function withdrawEmergency( address _token, uint256 _amount ) external onlyOwner returns (bool success) { require( IERC20Decimals(_token).balanceOf(address(this)) >= _amount, "Not enough tokens" ); IERC20Decimals(_token).safeTransfer(_msgSender(), _amount); return true; } function addPool( string calldata name, uint256 lockPeriod, uint256 periodLength, uint256 periodsNumber, uint256 percentPerNumber, uint256 startTime, uint256 cap, uint256 ratio ) external onlyOwner returns (bool success) { _addPool( name, lockPeriod, periodLength, periodsNumber, percentPerNumber, startTime, cap, ratio ); return true; } function updatePool( string calldata name, uint256 lockPeriod, uint256 periodLength, uint256 periodsNumber, uint256 percentPerNumber, uint256 startTime, uint256 cap, uint256 ratio ) external onlyOwner { require(poolLockTime[name].exists, "Pool: not exists"); require( periodsNumber.mul(percentPerNumber) <= percent, "Pool: percents exceeded limit" ); poolLockTime[name].lockPeriod = lockPeriod; poolLockTime[name].periodLength = periodLength; poolLockTime[name].periodsNumber = periodsNumber; poolLockTime[name].percent = percentPerNumber; poolLockTime[name].startTime = startTime; poolLockTime[name].cap = cap; poolLockTime[name].ratio = ratio; } function bulkUploadDeposits( bytes calldata data, string calldata _poolName ) external onlyManager { bulkDeposit[] memory depositArray = abi.decode(data, (bulkDeposit[])); for (uint8 i = 0; i < depositArray.length; i++) { depositAdmin( depositArray[i].beneficiary, depositArray[i].amount, _poolName ); } } function withdraw( uint256 lockBoxNumber, address beneficiary, string calldata _poolName ) external returns (bool) { require(poolLockTime[_poolName].exists, "Pool: not exists"); LockBoxStruct storage l = boxPool[_poolName][_msgSender()][ lockBoxNumber ]; require(l.balance > 0, "Benefeciary does not exists"); uint256 _unlockTime = l.depositTime.add( poolLockTime[_poolName].lockPeriod ); require(_unlockTime < block.timestamp, "Funds locked"); (uint256 amount, uint256 periods) = _calculateUnlockedTokens( beneficiary, lockBoxNumber, _poolName ); l.balance = l.balance.sub(amount); l.payed = l.payed.add(amount); l.periodsPassed = periods; require( token.balanceOf(address(this)) >= amount && amount > 0, "Wrong amount or balance" ); token.safeTransfer(_msgSender(), amount); poolLockTime[_poolName].withdrawn = poolLockTime[_poolName] .withdrawn .add(amount); emit LogLockBoxWithdrawal(_msgSender(), amount); return true; } function getBeneficiaryStructs( string calldata _poolName, address beneficiary ) external view returns (LockBoxStruct[] memory) { require(poolLockTime[_poolName].exists, "Pool: not exists"); return boxPool[_poolName][beneficiary]; } function getPools() external view returns (poolName[] memory) { return poolNamesArray; } function getTokensAvailable( string calldata _poolName, address beneficiary, uint256 id ) external view returns (uint256, uint256, uint256) { require(poolLockTime[_poolName].exists, "Pool: not exists"); (uint256 amount, uint256 periods) = _calculateUnlockedTokens( beneficiary, id, _poolName ); poolData memory pool = poolLockTime[_poolName]; uint256 timeToUnlock = pool.startTime.add(pool.lockPeriod) > block.timestamp ? pool.startTime.add(pool.lockPeriod).sub(block.timestamp) : 0; return (amount, timeToUnlock, periods); } function deposit( address buyToken, uint256 amount, string memory _poolName ) public returns (bool success) { require(allowedBuyTokens[buyToken], "Payment method does not allowed"); require(poolLockTime[_poolName].exists, "Pool: not exists"); require(poolLockTime[_poolName].status == 1, "Pool: not active"); require( poolLockTime[_poolName].deposited.add(amount) <= poolLockTime[_poolName].cap, "Pool: cap exceded" ); IERC20Decimals stable = IERC20Decimals(buyToken); uint256 stableAmount = (amount * 1e6) / (poolLockTime[_poolName].ratio * 10 ** (18 - stable.decimals())); require(stableAmount >= minimalDepositAmount, "Minimal amount required"); LockBoxStruct memory l; l.beneficiary = _msgSender(); l.balance = amount; l.total = amount; l.payed = 0; l.depositTime = poolLockTime[_poolName].startTime; l.periodsPassed = 0; boxPool[_poolName][_msgSender()].push(l); poolLockTime[_poolName].deposited = poolLockTime[_poolName] .deposited .add(amount); stable.safeTransferFrom(_msgSender(), wallet, stableAmount); emit LogLockBoxDeposit( _msgSender(), amount, buyToken, poolLockTime[_poolName].lockPeriod, _poolName, poolLockTime[_poolName].ratio ); return true; } function depositAdmin( address beneficiary, uint256 amount, string memory _poolName ) public onlyManager returns (bool success) { require(poolLockTime[_poolName].exists, "Pool: not exists"); require( poolLockTime[_poolName].deposited.add(amount) <= poolLockTime[_poolName].cap, "Pool: cap exceded" ); LockBoxStruct memory l; l.beneficiary = beneficiary; l.balance = amount; l.total = amount; l.payed = 0; l.depositTime = poolLockTime[_poolName].startTime; l.periodsPassed = 0; boxPool[_poolName][beneficiary].push(l); poolLockTime[_poolName].deposited = poolLockTime[_poolName] .deposited .add(amount); emit LogLockBoxDeposit( beneficiary, amount, address(0), poolLockTime[_poolName].lockPeriod, _poolName, poolLockTime[_poolName].ratio ); return true; } function getMapCount( address beneficiary, string memory _poolName ) external view returns (uint256) { require(poolLockTime[_poolName].exists, "Pool: not exists"); return boxPool[_poolName][beneficiary].length; } function _setAmount(uint256 amount) internal pure returns (uint256) { uint256 oneToken = 1e18; return oneToken.mul(amount); } function _addPool( string memory name, uint256 lockPeriod, uint256 periodLength, uint256 periodsNumber, uint256 percentPerNumber, uint256 startTime, uint256 cap, uint256 ratio ) internal returns (bool success) { require(!poolLockTime[name].exists, "Pool: already exists"); require( periodsNumber.mul(percentPerNumber) <= percent, "Pool: percents exceeded limit" ); poolName memory pD; poolLockTime[name].name = name; poolLockTime[name].lockPeriod = lockPeriod; poolLockTime[name].periodLength = periodLength; poolLockTime[name].periodsNumber = periodsNumber; poolLockTime[name].percent = percentPerNumber; poolLockTime[name].cap = cap; poolLockTime[name].ratio = ratio; poolLockTime[name].exists = true; poolLockTime[name].startTime = startTime; poolLockTime[name].status = 0; poolLockTime[name].deposited = 0; poolLockTime[name].withdrawn = 0; poolsCount = poolsCount.add(1); pD.name = name; poolNamesArray.push(pD); emit PoolAdded(name); return true; } function _calculateUnlockedTokens( address _beneficiary, uint256 _boxNumber, string memory _poolName ) private view returns (uint256, uint256) { LockBoxStruct memory box = boxPool[_poolName][_beneficiary][_boxNumber]; poolData memory pool = poolLockTime[_poolName]; uint256 _cliff = pool.lockPeriod; uint256 _periodLength = pool.periodLength; uint256 _periodAmount = (box.total * pool.percent) / percent; uint256 _periodsNumber = pool.periodsNumber; if (box.depositTime.add(_cliff) > block.timestamp) { return (0, 0); } uint256 periods = block.timestamp.sub(box.depositTime.add(_cliff)).div( _periodLength ); periods = periods > _periodsNumber ? _periodsNumber : periods; uint256 periodsToSend = periods.sub(box.periodsPassed); if ( box.periodsPassed == _periodsNumber && box.total.sub(box.payed) > 0 ) { return (box.total.sub(box.payed), periods); } return (periodsToSend.mul(_periodAmount), periods); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) 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 onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _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. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @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 proxied contracts do not make use of 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. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * 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. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized != type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) 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 onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _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 making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/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 IERC20PermitUpgradeable { /** * @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.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../extensions/IERC20PermitUpgradeable.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; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ 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)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ 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"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20PermitUpgradeable 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(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"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) { // 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 cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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.8.0/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; 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 onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; interface IERC20Decimals is IERC20Upgradeable { function decimals() external view returns (uint8); }
{ "optimizer": { "enabled": true, "runs": 800 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"stable","type":"address"},{"indexed":false,"internalType":"uint256","name":"releaseTime","type":"uint256"},{"indexed":false,"internalType":"string","name":"pool","type":"string"},{"indexed":false,"internalType":"uint256","name":"ratio","type":"uint256"}],"name":"LogLockBoxDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogLockBoxWithdrawal","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":"string","name":"name","type":"string"}],"name":"PoolAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"manager","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"UpdateManager","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"lockPeriod","type":"uint256"},{"internalType":"uint256","name":"periodLength","type":"uint256"},{"internalType":"uint256","name":"periodsNumber","type":"uint256"},{"internalType":"uint256","name":"percentPerNumber","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"cap","type":"uint256"},{"internalType":"uint256","name":"ratio","type":"uint256"}],"name":"addPool","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowedBuyTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"boxPool","outputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"payed","type":"uint256"},{"internalType":"uint256","name":"depositTime","type":"uint256"},{"internalType":"uint256","name":"periodsPassed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"string","name":"_poolName","type":"string"}],"name":"bulkUploadDeposits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"buyToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"string","name":"_poolName","type":"string"}],"name":"deposit","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"string","name":"_poolName","type":"string"}],"name":"depositAdmin","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_poolName","type":"string"},{"internalType":"address","name":"beneficiary","type":"address"}],"name":"getBeneficiaryStructs","outputs":[{"components":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"payed","type":"uint256"},{"internalType":"uint256","name":"depositTime","type":"uint256"},{"internalType":"uint256","name":"periodsPassed","type":"uint256"}],"internalType":"struct TimeLock.LockBoxStruct[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"string","name":"_poolName","type":"string"}],"name":"getMapCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPools","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"}],"internalType":"struct TimeLock.poolName[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_poolName","type":"string"},{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getTokensAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"managers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimalDepositAmount","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":"percent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"poolLockTime","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"lockPeriod","type":"uint256"},{"internalType":"uint256","name":"periodLength","type":"uint256"},{"internalType":"uint256","name":"periodsNumber","type":"uint256"},{"internalType":"uint256","name":"percent","type":"uint256"},{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"cap","type":"uint256"},{"internalType":"uint256","name":"ratio","type":"uint256"},{"internalType":"uint8","name":"status","type":"uint8"},{"internalType":"uint256","name":"deposited","type":"uint256"},{"internalType":"uint256","name":"withdrawn","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setBuyToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_manager","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMinimalDepositAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_poolName","type":"string"},{"internalType":"uint8","name":"_status","type":"uint8"}],"name":"setPoolStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"setWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"lockPeriod","type":"uint256"},{"internalType":"uint256","name":"periodLength","type":"uint256"},{"internalType":"uint256","name":"periodsNumber","type":"uint256"},{"internalType":"uint256","name":"percentPerNumber","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"cap","type":"uint256"},{"internalType":"uint256","name":"ratio","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockBoxNumber","type":"uint256"},{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"string","name":"_poolName","type":"string"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawEmergency","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b506200001c62000022565b620000e3565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000e1576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b613b1b80620000f36000396000f3fe6080604052600436106101ae5760003560e01c8063ab54b7d8116100eb578063df4921871161008f578063f2fde38b11610061578063f2fde38b14610539578063f648fa8814610559578063fdff9b4d146105b0578063ff8c4496146105e057005b8063df492187146104b6578063ee3de960146104d6578063f108a7d214610503578063f1aaef811461052357005b8063c1f57af7116100c8578063c1f57af71461041e578063c4d66de814610456578063cb376bf314610476578063deaa59df1461049657005b8063ab54b7d8146103be578063b020f892146103de578063bfe07da6146103fe57005b806370ba1113116101525780637d049fb61161012f5780637d049fb61461034a5780638c788de01461036a5780638da5cb5b14610380578063a5e90eee1461039e57005b806370ba1113146102ff578063715018a61461031557806373260c651461032a57005b8063521eb2731161018b578063521eb27314610245578063673a2a1f1461027d5780636b06c35a1461029f5780636c3d7e1d146102df57005b8063095249de146101b757806310092b35146101f7578063144fa6d71461022557005b366101b557005b005b3480156101c357600080fd5b506101d76101d23660046133be565b610600565b604080519384526020840192909252908201526060015b60405180910390f35b34801561020357600080fd5b5061021761021236600461313a565b61085e565b6040519081526020016101ee565b34801561023157600080fd5b506101b56102403660046130e8565b610903565b34801561025157600080fd5b50609754610265906001600160a01b031681565b6040516001600160a01b0390911681526020016101ee565b34801561028957600080fd5b50610292610983565b6040516101ee919061373b565b3480156102ab57600080fd5b506102cf6102ba3660046130e8565b60a06020526000908152604090205460ff1681565b60405190151581526020016101ee565b3480156102eb57600080fd5b506102cf6102fa366004613188565b610a70565b34801561030b57600080fd5b5061021760985481565b34801561032157600080fd5b506101b5610b5e565b34801561033657600080fd5b506101b5610345366004613103565b610b72565b34801561035657600080fd5b506102cf61036536600461341a565b610c21565b34801561037657600080fd5b5061021760995481565b34801561038c57600080fd5b506033546001600160a01b0316610265565b3480156103aa57600080fd5b506101b56103b9366004613103565b610c84565b3480156103ca57600080fd5b506101b56103d936600461341a565b610d6c565b3480156103ea57600080fd5b506101b56103f936600461357a565b610f57565b34801561040a57600080fd5b506102cf6104193660046131b2565b610f64565b34801561042a57600080fd5b5061043e6104393660046134ee565b611483565b6040516101ee9c9b9a999897969594939291906137b8565b34801561046257600080fd5b506101b56104713660046130e8565b61157c565b34801561048257600080fd5b506101b5610491366004613497565b6116dd565b3480156104a257600080fd5b506101b56104b13660046130e8565b61185a565b3480156104c257600080fd5b506101b56104d13660046132fe565b6118da565b3480156104e257600080fd5b506104f66104f136600461336a565b611a00565b6040516101ee91906136ba565b34801561050f57600080fd5b506102cf61051e3660046135ac565b611b34565b34801561052f57600080fd5b50610217609a5481565b34801561054557600080fd5b506101b56105543660046130e8565b611ef5565b34801561056557600080fd5b50610579610574366004613523565b611f85565b604080516001600160a01b0390971687526020870195909552938501929092526060840152608083015260a082015260c0016101ee565b3480156105bc57600080fd5b506102cf6105cb3660046130e8565b609f6020526000908152604090205460ff1681565b3480156105ec57600080fd5b506102cf6105fb3660046131b2565b611ffa565b6000806000609e878760405161061792919061365f565b9081526040519081900360200190206005015460ff166106715760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b60448201526064015b60405180910390fd5b6000806106b587878b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061233e92505050565b915091506000609e8a8a6040516106cd92919061365f565b9081526020016040518091039020604051806101800160405290816000820180546106f790613a2b565b80601f016020809104026020016040519081016040528092919081815260200182805461072390613a2b565b80156107705780601f1061074557610100808354040283529160200191610770565b820191906000526020600020905b81548152906001019060200180831161075357829003601f168201915b50505091835250506001820154602080830191909152600283015460408301526003830154606083015260048301546080830152600583015460ff908116151560a0840152600684015460c080850191909152600785015460e085015260088501546101008501526009850154909116610120840152600a840154610140840152600b909301546101609092019190915282015190820151919250600091429161081a919061266f565b1161082657600061084b565b61084b4261084584602001518560c0015161266f90919063ffffffff16565b90612682565b939b939a50919850919650505050505050565b6000609e826040516108709190613643565b9081526040519081900360200190206005015460ff166108c55760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b609d826040516108d59190613643565b90815260408051602092819003830190206001600160a01b0386166000908152925290205490505b92915050565b61090b61268e565b6001600160a01b0381166109615760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f77656400000000000000006044820152606401610668565b609c80546001600160a01b0319166001600160a01b0392909216919091179055565b6060609b805480602002602001604051908101604052809291908181526020016000905b82821015610a67578382906000526020600020016040518060200160405290816000820180546109d690613a2b565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0290613a2b565b8015610a4f5780601f10610a2457610100808354040283529160200191610a4f565b820191906000526020600020905b815481529060010190602001808311610a3257829003601f168201915b505050505081525050815260200190600101906109a7565b50505050905090565b6000610a7a61268e565b6040516370a0823160e01b815230600482015282906001600160a01b038516906370a082319060240160206040518083038186803b158015610abb57600080fd5b505afa158015610acf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af39190613593565b1015610b415760405162461bcd60e51b815260206004820152601160248201527f4e6f7420656e6f75676820746f6b656e730000000000000000000000000000006044820152606401610668565b610b556001600160a01b03841633846126e8565b50600192915050565b610b6661268e565b610b70600061277d565b565b610b7a61268e565b6001600160a01b038216610bf65760405162461bcd60e51b815260206004820152602560248201527f507269766174655374616b696e673a20696e76616c696420746f6b656e20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610668565b6001600160a01b0391909116600090815260a060205260409020805460ff1916911515919091179055565b6000610c2b61268e565b610c738a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92508b91508a9050898989896127cf565b5060019a9950505050505050505050565b610c8c61268e565b6001600160a01b038216610d085760405162461bcd60e51b815260206004820152602760248201527f507269766174655374616b696e673a20696e76616c6964206d616e616765722060448201527f61646472657373000000000000000000000000000000000000000000000000006064820152608401610668565b6001600160a01b0382166000818152609f6020908152604091829020805460ff19168515159081179091558251938452908301527f28313cd3caea26c974df558965acd2331e5e52597da1446395364c1573229a5291015b60405180910390a15050565b610d7461268e565b609e8989604051610d8692919061365f565b9081526040519081900360200190206005015460ff16610ddb5760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b609854610de88686612b50565b1115610e365760405162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a2070657263656e7473206578636565646564206c696d69740000006044820152606401610668565b86609e8a8a604051610e4992919061365f565b90815260200160405180910390206001018190555085609e8a8a604051610e7192919061365f565b90815260200160405180910390206002018190555084609e8a8a604051610e9992919061365f565b90815260200160405180910390206003018190555083609e8a8a604051610ec192919061365f565b90815260200160405180910390206004018190555082609e8a8a604051610ee992919061365f565b90815260200160405180910390206006018190555081609e8a8a604051610f1192919061365f565b90815260200160405180910390206007018190555080609e8a8a604051610f3992919061365f565b90815260405190819003602001902060080155505050505050505050565b610f5f61268e565b609a55565b6001600160a01b038316600090815260a0602052604081205460ff16610fcc5760405162461bcd60e51b815260206004820152601f60248201527f5061796d656e74206d6574686f6420646f6573206e6f7420616c6c6f776564006044820152606401610668565b609e82604051610fdc9190613643565b9081526040519081900360200190206005015460ff166110315760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b609e826040516110419190613643565b9081526040519081900360200190206009015460ff166001146110a65760405162461bcd60e51b815260206004820152601060248201527f506f6f6c3a206e6f7420616374697665000000000000000000000000000000006044820152606401610668565b609e826040516110b69190613643565b9081526020016040518091039020600701546110f584609e856040516110dc9190613643565b908152604051908190036020019020600a01549061266f565b11156111435760405162461bcd60e51b815260206004820152601160248201527f506f6f6c3a2063617020657863656465640000000000000000000000000000006044820152606401610668565b60008490506000816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561118357600080fd5b505afa158015611197573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111bb91906135fa565b6111c69060126139dc565b6111d190600a6138fb565b609e856040516111e19190613643565b9081526020016040518091039020600801546111fd91906139a6565b61120a86620f42406139a6565b6112149190613896565b9050609a548110156112685760405162461bcd60e51b815260206004820152601760248201527f4d696e696d616c20616d6f756e742072657175697265640000000000000000006044820152606401610668565b6112aa6040518060c0016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081525090565b3381526040808201879052602082018790526000606083015251609e906112d2908790613643565b9081526040805191829003602001909120600601546080830152600060a083015251609d90611302908790613643565b908152602001604051809103902060006113193390565b6001600160a01b0390811682526020808301939093526040918201600090812080546001808201835591835291859020865160069093020180546001600160a01b031916929093169190911782559284015192810192909255828101516002830155606083015160038301556080830151600483015560a0830151600590920191909155516113b2908790609e906110dc908990613643565b609e866040516113c29190613643565b908152604051908190036020019020600a01556113f66113df3390565b6097546001600160a01b0386811692911685612b5c565b7f70f42571e52a3d199e10403d607c0456c3ce8a36b0db2d126d05f22f62778922338789609e8960405161142a9190613643565b90815260200160405180910390206001015489609e8b60405161144d9190613643565b9081526040519081900360200181206008015461146e96959493929161366f565b60405180910390a15060019695505050505050565b8051602081830181018051609e825292820191909301209152805481906114a990613a2b565b80601f01602080910402602001604051908101604052809291908181526020018280546114d590613a2b565b80156115225780601f106114f757610100808354040283529160200191611522565b820191906000526020600020905b81548152906001019060200180831161150557829003601f168201915b50505060018401546002850154600386015460048701546005880154600689015460078a015460088b015460098c0154600a8d0154600b909d01549b9c989b979a50959850939660ff93841696929591949391909116918c565b600054610100900460ff161580801561159c5750600054600160ff909116105b806115b65750303b1580156115b6575060005460ff166001145b6116285760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610668565b6000805460ff19166001179055801561164b576000805461ff0019166101001790555b611653612b9a565b61165b612c0d565b609780546001600160a01b0319166001600160a01b038416179055620f4240609855336000908152609f60205260409020805460ff1916600117905580156116d9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610d60565b5050565b336000908152609f602052604090205460ff166117485760405162461bcd60e51b815260206004820152602360248201527f4f6e6c79206d616e616765722063616e2063616c6c20746869732066756e637460448201526234b7b760e91b6064820152608401610668565b609e838360405161175a92919061365f565b9081526040519081900360200190206005015460ff166117af5760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b60ff811615806117c257508060ff166001145b806117d057508060ff166002145b61181c5760405162461bcd60e51b815260206004820152600c60248201527f57726f6e672073746174757300000000000000000000000000000000000000006044820152606401610668565b80609e848460405161182f92919061365f565b908152604051908190036020019020600901805460ff9290921660ff19909216919091179055505050565b61186261268e565b6001600160a01b0381166118b85760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f77656400000000000000006044820152606401610668565b609780546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152609f602052604090205460ff166119455760405162461bcd60e51b815260206004820152602360248201527f4f6e6c79206d616e616765722063616e2063616c6c20746869732066756e637460448201526234b7b760e91b6064820152608401610668565b600061195384860186613209565b905060005b81518160ff1610156119f8576119e5828260ff168151811061197c5761197c613a9c565b602002602001015160000151838360ff168151811061199d5761199d613a9c565b60200260200101516020015186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ffa92505050565b50806119f081613a66565b915050611958565b505050505050565b6060609e8484604051611a1492919061365f565b9081526040519081900360200190206005015460ff16611a695760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b609d8484604051611a7b92919061365f565b9081526040805191829003602090810183206001600160a01b0386166000908152908252828120805480840286018401909452838552929184015b82821015611b275760008481526020908190206040805160c0810182526006860290920180546001600160a01b031683526001808201548486015260028201549284019290925260038101546060840152600481015460808401526005015460a08301529083529092019101611ab6565b5050505090509392505050565b6000609e8383604051611b4892919061365f565b9081526040519081900360200190206005015460ff16611b9d5760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b6000609d8484604051611bb192919061365f565b90815260200160405180910390206000611bc83390565b6001600160a01b03166001600160a01b031681526020019081526020016000208681548110611bf957611bf9613a9c565b906000526020600020906006020190506000816002015411611c5d5760405162461bcd60e51b815260206004820152601b60248201527f42656e656665636961727920646f6573206e6f742065786973747300000000006044820152606401610668565b6000611c92609e8686604051611c7492919061365f565b9081526040519081900360200190206001015460048401549061266f565b9050428110611ce35760405162461bcd60e51b815260206004820152600c60248201527f46756e6473206c6f636b656400000000000000000000000000000000000000006044820152606401610668565b600080611d27888a89898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061233e92505050565b60028601549193509150611d3b9083612682565b60028501556003840154611d4f908361266f565b600385015560058401819055609c546040516370a0823160e01b815230600482015283916001600160a01b0316906370a082319060240160206040518083038186803b158015611d9e57600080fd5b505afa158015611db2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd69190613593565b10158015611de45750600082115b611e305760405162461bcd60e51b815260206004820152601760248201527f57726f6e6720616d6f756e74206f722062616c616e63650000000000000000006044820152606401610668565b611e4733609c546001600160a01b031690846126e8565b611e7682609e8989604051611e5d92919061365f565b908152604051908190036020019020600b01549061266f565b609e8888604051611e8892919061365f565b908152604051908190036020019020600b01557f4ee0bce2f3dfb53dc0564ce5a7e1934da5c7866b06ba77f86c397b7b976a3144611ec33390565b604080516001600160a01b039092168252602082018590520160405180910390a160019450505050505b949350505050565b611efd61268e565b6001600160a01b038116611f795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610668565b611f828161277d565b50565b8251602081850181018051609d82529282018287012092905252600082815260409020805482908110611fb757600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941697509195509350919086565b336000908152609f602052604081205460ff166120655760405162461bcd60e51b815260206004820152602360248201527f4f6e6c79206d616e616765722063616e2063616c6c20746869732066756e637460448201526234b7b760e91b6064820152608401610668565b609e826040516120759190613643565b9081526040519081900360200190206005015460ff166120ca5760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b609e826040516120da9190613643565b90815260200160405180910390206007015461210084609e856040516110dc9190613643565b111561214e5760405162461bcd60e51b815260206004820152601160248201527f506f6f6c3a2063617020657863656465640000000000000000000000000000006044820152606401610668565b6121906040518060c0016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081525090565b6001600160a01b03851681526040808201859052602082018590526000606083015251609e906121c1908590613643565b9081526040805191829003602001909120600601546080830152600060a083015251609d906121f1908590613643565b9081526040805191829003602090810183206001600160a01b03808a1660009081529183528382208054600181810183559184529284902087516006909402018054939092166001600160a01b03199093169290921781559185015190820155908301516002820155606083015160038201556080830151600482015560a083015160059091015561228d908590609e906110dc908790613643565b609e8460405161229d9190613643565b9081526020016040518091039020600a01819055507f70f42571e52a3d199e10403d607c0456c3ce8a36b0db2d126d05f22f6277892285856000609e876040516122e79190613643565b90815260200160405180910390206001015487609e8960405161230a9190613643565b9081526040519081900360200181206008015461232b96959493929161366f565b60405180910390a1506001949350505050565b6000806000609d846040516123539190613643565b90815260200160405180910390206000876001600160a01b03166001600160a01b03168152602001908152602001600020858154811061239557612395613a9c565b600091825260208083206040805160c081018252600690940290910180546001600160a01b03168452600181015492840192909252600282015483820152600382015460608401526004820154608084015260059091015460a083015251909250609e90612404908790613643565b90815260200160405180910390206040518061018001604052908160008201805461242e90613a2b565b80601f016020809104026020016040519081016040528092919081815260200182805461245a90613a2b565b80156124a75780601f1061247c576101008083540402835291602001916124a7565b820191906000526020600020905b81548152906001019060200180831161248a57829003601f168201915b505050918352505060018201546020808301919091526002830154604080840191909152600384015460608401526004840154608080850191909152600585015460ff908116151560a0860152600686015460c0860152600786015460e08601526008860154610100860152600986015416610120850152600a850154610140850152600b909401546101609093019290925283810151918401516098549385015191870151949550919391926000929091612562916139a6565b61256c9190613896565b60608501516080870151919250904290612586908661266f565b111561259e5760008097509750505050505050612667565b60006125cb846125c56125be888b6080015161266f90919063ffffffff16565b4290612682565b90612c80565b90508181116125da57806125dc565b815b905060006125f78860a001518361268290919063ffffffff16565b9050828860a001511480156126265750600061262489606001518a6020015161268290919063ffffffff16565b115b15612650576060880151602089015161263e91612682565b82995099505050505050505050612667565b61265a8185612b50565b9950909750505050505050505b935093915050565b600061267b828461387e565b9392505050565b600061267b82846139c5565b6033546001600160a01b03163314610b705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610668565b6040516001600160a01b03831660248201526044810182905261277890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612c8c565b505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000609e896040516127e19190613643565b9081526040519081900360200190206005015460ff16156128445760405162461bcd60e51b815260206004820152601460248201527f506f6f6c3a20616c7265616479206578697374730000000000000000000000006044820152606401610668565b6098546128518787612b50565b111561289f5760405162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a2070657263656e7473206578636565646564206c696d69740000006044820152606401610668565b60408051602081019091526060815289609e8b6040516128bf9190613643565b908152602001604051809103902060000190805190602001906128e3929190612f7a565b5088609e8b6040516128f59190613643565b90815260200160405180910390206001018190555087609e8b60405161291b9190613643565b90815260200160405180910390206002018190555086609e8b6040516129419190613643565b90815260200160405180910390206003018190555085609e8b6040516129679190613643565b90815260200160405180910390206004018190555083609e8b60405161298d9190613643565b90815260200160405180910390206007018190555082609e8b6040516129b39190613643565b9081526020016040518091039020600801819055506001609e8b6040516129da9190613643565b908152604051908190036020018120600501805492151560ff19909316929092179091558590609e90612a0e908d90613643565b9081526020016040518091039020600601819055506000609e8b604051612a359190613643565b908152602001604051809103902060090160006101000a81548160ff021916908360ff1602179055506000609e8b604051612a709190613643565b9081526020016040518091039020600a01819055506000609e8b604051612a979190613643565b908152604051908190036020019020600b0155609954612ab890600161266f565b609955898152609b80546001810182556000919091528151805183927fbba9db4cdbea0a37c207bbb83e20f828cd4441c49891101dc94fd20dc8efc3490191612b0691839160200190612f7a565b5050507f228cfd215d48179cf899c57214fe4e201044cfde6ed6effd74c3e423715698da8a604051612b3891906137a5565b60405180910390a15060019998505050505050505050565b600061267b82846139a6565b6040516001600160a01b0380851660248301528316604482015260648101829052612b949085906323b872dd60e01b90608401612714565b50505050565b600054610100900460ff16612c055760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610668565b610b70612d74565b600054610100900460ff16612c785760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610668565b610b70612de6565b600061267b8284613896565b6000612ce1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612e5a9092919063ffffffff16565b9050805160001480612d02575080806020019051810190612d0291906132e1565b6127785760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610668565b600054610100900460ff16612ddf5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610668565b6001606555565b600054610100900460ff16612e515760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610668565b610b703361277d565b6060611eed848460008585600080866001600160a01b03168587604051612e819190613643565b60006040518083038185875af1925050503d8060008114612ebe576040519150601f19603f3d011682016040523d82523d6000602084013e612ec3565b606091505b5091509150612ed487838387612edf565b979650505050505050565b60608315612f4b578251612f44576001600160a01b0385163b612f445760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610668565b5081611eed565b611eed8383815115612f605781518083602001fd5b8060405162461bcd60e51b815260040161066891906137a5565b828054612f8690613a2b565b90600052602060002090601f016020900481019282612fa85760008555612fee565b82601f10612fc157805160ff1916838001178555612fee565b82800160010185558215612fee579182015b82811115612fee578251825591602001919060010190612fd3565b50612ffa929150612ffe565b5090565b5b80821115612ffa5760008155600101612fff565b80356001600160a01b038116811461302a57600080fd5b919050565b60008083601f84011261304157600080fd5b50813567ffffffffffffffff81111561305957600080fd5b60208301915083602082850101111561307157600080fd5b9250929050565b600082601f83011261308957600080fd5b813567ffffffffffffffff8111156130a3576130a3613ab2565b6130b6601f8201601f191660200161384d565b8181528460208386010111156130cb57600080fd5b816020850160208301376000918101602001919091529392505050565b6000602082840312156130fa57600080fd5b61267b82613013565b6000806040838503121561311657600080fd5b61311f83613013565b9150602083013561312f81613ac8565b809150509250929050565b6000806040838503121561314d57600080fd5b61315683613013565b9150602083013567ffffffffffffffff81111561317257600080fd5b61317e85828601613078565b9150509250929050565b6000806040838503121561319b57600080fd5b6131a483613013565b946020939093013593505050565b6000806000606084860312156131c757600080fd5b6131d084613013565b925060208401359150604084013567ffffffffffffffff8111156131f357600080fd5b6131ff86828701613078565b9150509250925092565b6000602080838503121561321c57600080fd5b823567ffffffffffffffff8082111561323457600080fd5b818501915085601f83011261324857600080fd5b81358181111561325a5761325a613ab2565b613268848260051b0161384d565b8181528481019250838501600683901b8501860189101561328857600080fd5b60009450845b838110156132d357604080838c0312156132a6578687fd5b6132ae613824565b6132b784613013565b815283890135898201528652948701949091019060010161328e565b509098975050505050505050565b6000602082840312156132f357600080fd5b815161267b81613ac8565b6000806000806040858703121561331457600080fd5b843567ffffffffffffffff8082111561332c57600080fd5b6133388883890161302f565b9096509450602087013591508082111561335157600080fd5b5061335e8782880161302f565b95989497509550505050565b60008060006040848603121561337f57600080fd5b833567ffffffffffffffff81111561339657600080fd5b6133a28682870161302f565b90945092506133b5905060208501613013565b90509250925092565b600080600080606085870312156133d457600080fd5b843567ffffffffffffffff8111156133eb57600080fd5b6133f78782880161302f565b909550935061340a905060208601613013565b9396929550929360400135925050565b60008060008060008060008060006101008a8c03121561343957600080fd5b893567ffffffffffffffff81111561345057600080fd5b61345c8c828d0161302f565b909d909c5060208c01359b60408101359b5060608101359a506080810135995060a0810135985060c0810135975060e0013595509350505050565b6000806000604084860312156134ac57600080fd5b833567ffffffffffffffff8111156134c357600080fd5b6134cf8682870161302f565b90945092505060208401356134e381613ad6565b809150509250925092565b60006020828403121561350057600080fd5b813567ffffffffffffffff81111561351757600080fd5b611eed84828501613078565b60008060006060848603121561353857600080fd5b833567ffffffffffffffff81111561354f57600080fd5b61355b86828701613078565b93505061356a60208501613013565b9150604084013590509250925092565b60006020828403121561358c57600080fd5b5035919050565b6000602082840312156135a557600080fd5b5051919050565b600080600080606085870312156135c257600080fd5b843593506135d260208601613013565b9250604085013567ffffffffffffffff8111156135ee57600080fd5b61335e8782880161302f565b60006020828403121561360c57600080fd5b815161267b81613ad6565b6000815180845261362f8160208601602086016139ff565b601f01601f19169290920160200192915050565b600082516136558184602087016139ff565b9190910192915050565b8183823760009101908152919050565b60006001600160a01b03808916835287602084015280871660408401525084606083015260c060808301526136a760c0830185613617565b90508260a0830152979650505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561372e57815180516001600160a01b0316855286810151878601528581015186860152606080820151908601526080808201519086015260a0908101519085015260c090930192908501906001016136d7565b5091979650505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561379857878503603f1901845281515186865261378587870182613617565b9550509285019290850190600101613762565b5092979650505050505050565b60208152600061267b6020830184613617565b610180815260006137cd61018083018f613617565b602083019d909d5250604081019a909a5260608a0198909852608089019690965293151560a088015260c087019290925260e086015261010085015260ff1661012084015261014083015261016090910152919050565b6040805190810167ffffffffffffffff8111828210171561384757613847613ab2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561387657613876613ab2565b604052919050565b6000821982111561389157613891613a86565b500190565b6000826138b357634e487b7160e01b600052601260045260246000fd5b500490565b600181815b808511156138f35781600019048211156138d9576138d9613a86565b808516156138e657918102915b93841c93908002906138bd565b509250929050565b600061267b60ff841683600082613914575060016108fd565b81613921575060006108fd565b816001811461393757600281146139415761395d565b60019150506108fd565b60ff84111561395257613952613a86565b50506001821b6108fd565b5060208310610133831016604e8410600b8410161715613980575081810a6108fd565b61398a83836138b8565b806000190482111561399e5761399e613a86565b029392505050565b60008160001904831182151516156139c0576139c0613a86565b500290565b6000828210156139d7576139d7613a86565b500390565b600060ff821660ff8416808210156139f6576139f6613a86565b90039392505050565b60005b83811015613a1a578181015183820152602001613a02565b83811115612b945750506000910152565b600181811c90821680613a3f57607f821691505b60208210811415613a6057634e487b7160e01b600052602260045260246000fd5b50919050565b600060ff821660ff811415613a7d57613a7d613a86565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114611f8257600080fd5b60ff81168114611f8257600080fdfea26469706673582212205eb1e7ceda48fc4802f0a7cacecb4efe954ac06be2407121b47141172e8ab7c964736f6c63430008070033
Deployed Bytecode
0x6080604052600436106101ae5760003560e01c8063ab54b7d8116100eb578063df4921871161008f578063f2fde38b11610061578063f2fde38b14610539578063f648fa8814610559578063fdff9b4d146105b0578063ff8c4496146105e057005b8063df492187146104b6578063ee3de960146104d6578063f108a7d214610503578063f1aaef811461052357005b8063c1f57af7116100c8578063c1f57af71461041e578063c4d66de814610456578063cb376bf314610476578063deaa59df1461049657005b8063ab54b7d8146103be578063b020f892146103de578063bfe07da6146103fe57005b806370ba1113116101525780637d049fb61161012f5780637d049fb61461034a5780638c788de01461036a5780638da5cb5b14610380578063a5e90eee1461039e57005b806370ba1113146102ff578063715018a61461031557806373260c651461032a57005b8063521eb2731161018b578063521eb27314610245578063673a2a1f1461027d5780636b06c35a1461029f5780636c3d7e1d146102df57005b8063095249de146101b757806310092b35146101f7578063144fa6d71461022557005b366101b557005b005b3480156101c357600080fd5b506101d76101d23660046133be565b610600565b604080519384526020840192909252908201526060015b60405180910390f35b34801561020357600080fd5b5061021761021236600461313a565b61085e565b6040519081526020016101ee565b34801561023157600080fd5b506101b56102403660046130e8565b610903565b34801561025157600080fd5b50609754610265906001600160a01b031681565b6040516001600160a01b0390911681526020016101ee565b34801561028957600080fd5b50610292610983565b6040516101ee919061373b565b3480156102ab57600080fd5b506102cf6102ba3660046130e8565b60a06020526000908152604090205460ff1681565b60405190151581526020016101ee565b3480156102eb57600080fd5b506102cf6102fa366004613188565b610a70565b34801561030b57600080fd5b5061021760985481565b34801561032157600080fd5b506101b5610b5e565b34801561033657600080fd5b506101b5610345366004613103565b610b72565b34801561035657600080fd5b506102cf61036536600461341a565b610c21565b34801561037657600080fd5b5061021760995481565b34801561038c57600080fd5b506033546001600160a01b0316610265565b3480156103aa57600080fd5b506101b56103b9366004613103565b610c84565b3480156103ca57600080fd5b506101b56103d936600461341a565b610d6c565b3480156103ea57600080fd5b506101b56103f936600461357a565b610f57565b34801561040a57600080fd5b506102cf6104193660046131b2565b610f64565b34801561042a57600080fd5b5061043e6104393660046134ee565b611483565b6040516101ee9c9b9a999897969594939291906137b8565b34801561046257600080fd5b506101b56104713660046130e8565b61157c565b34801561048257600080fd5b506101b5610491366004613497565b6116dd565b3480156104a257600080fd5b506101b56104b13660046130e8565b61185a565b3480156104c257600080fd5b506101b56104d13660046132fe565b6118da565b3480156104e257600080fd5b506104f66104f136600461336a565b611a00565b6040516101ee91906136ba565b34801561050f57600080fd5b506102cf61051e3660046135ac565b611b34565b34801561052f57600080fd5b50610217609a5481565b34801561054557600080fd5b506101b56105543660046130e8565b611ef5565b34801561056557600080fd5b50610579610574366004613523565b611f85565b604080516001600160a01b0390971687526020870195909552938501929092526060840152608083015260a082015260c0016101ee565b3480156105bc57600080fd5b506102cf6105cb3660046130e8565b609f6020526000908152604090205460ff1681565b3480156105ec57600080fd5b506102cf6105fb3660046131b2565b611ffa565b6000806000609e878760405161061792919061365f565b9081526040519081900360200190206005015460ff166106715760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b60448201526064015b60405180910390fd5b6000806106b587878b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061233e92505050565b915091506000609e8a8a6040516106cd92919061365f565b9081526020016040518091039020604051806101800160405290816000820180546106f790613a2b565b80601f016020809104026020016040519081016040528092919081815260200182805461072390613a2b565b80156107705780601f1061074557610100808354040283529160200191610770565b820191906000526020600020905b81548152906001019060200180831161075357829003601f168201915b50505091835250506001820154602080830191909152600283015460408301526003830154606083015260048301546080830152600583015460ff908116151560a0840152600684015460c080850191909152600785015460e085015260088501546101008501526009850154909116610120840152600a840154610140840152600b909301546101609092019190915282015190820151919250600091429161081a919061266f565b1161082657600061084b565b61084b4261084584602001518560c0015161266f90919063ffffffff16565b90612682565b939b939a50919850919650505050505050565b6000609e826040516108709190613643565b9081526040519081900360200190206005015460ff166108c55760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b609d826040516108d59190613643565b90815260408051602092819003830190206001600160a01b0386166000908152925290205490505b92915050565b61090b61268e565b6001600160a01b0381166109615760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f77656400000000000000006044820152606401610668565b609c80546001600160a01b0319166001600160a01b0392909216919091179055565b6060609b805480602002602001604051908101604052809291908181526020016000905b82821015610a67578382906000526020600020016040518060200160405290816000820180546109d690613a2b565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0290613a2b565b8015610a4f5780601f10610a2457610100808354040283529160200191610a4f565b820191906000526020600020905b815481529060010190602001808311610a3257829003601f168201915b505050505081525050815260200190600101906109a7565b50505050905090565b6000610a7a61268e565b6040516370a0823160e01b815230600482015282906001600160a01b038516906370a082319060240160206040518083038186803b158015610abb57600080fd5b505afa158015610acf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af39190613593565b1015610b415760405162461bcd60e51b815260206004820152601160248201527f4e6f7420656e6f75676820746f6b656e730000000000000000000000000000006044820152606401610668565b610b556001600160a01b03841633846126e8565b50600192915050565b610b6661268e565b610b70600061277d565b565b610b7a61268e565b6001600160a01b038216610bf65760405162461bcd60e51b815260206004820152602560248201527f507269766174655374616b696e673a20696e76616c696420746f6b656e20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610668565b6001600160a01b0391909116600090815260a060205260409020805460ff1916911515919091179055565b6000610c2b61268e565b610c738a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92508b91508a9050898989896127cf565b5060019a9950505050505050505050565b610c8c61268e565b6001600160a01b038216610d085760405162461bcd60e51b815260206004820152602760248201527f507269766174655374616b696e673a20696e76616c6964206d616e616765722060448201527f61646472657373000000000000000000000000000000000000000000000000006064820152608401610668565b6001600160a01b0382166000818152609f6020908152604091829020805460ff19168515159081179091558251938452908301527f28313cd3caea26c974df558965acd2331e5e52597da1446395364c1573229a5291015b60405180910390a15050565b610d7461268e565b609e8989604051610d8692919061365f565b9081526040519081900360200190206005015460ff16610ddb5760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b609854610de88686612b50565b1115610e365760405162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a2070657263656e7473206578636565646564206c696d69740000006044820152606401610668565b86609e8a8a604051610e4992919061365f565b90815260200160405180910390206001018190555085609e8a8a604051610e7192919061365f565b90815260200160405180910390206002018190555084609e8a8a604051610e9992919061365f565b90815260200160405180910390206003018190555083609e8a8a604051610ec192919061365f565b90815260200160405180910390206004018190555082609e8a8a604051610ee992919061365f565b90815260200160405180910390206006018190555081609e8a8a604051610f1192919061365f565b90815260200160405180910390206007018190555080609e8a8a604051610f3992919061365f565b90815260405190819003602001902060080155505050505050505050565b610f5f61268e565b609a55565b6001600160a01b038316600090815260a0602052604081205460ff16610fcc5760405162461bcd60e51b815260206004820152601f60248201527f5061796d656e74206d6574686f6420646f6573206e6f7420616c6c6f776564006044820152606401610668565b609e82604051610fdc9190613643565b9081526040519081900360200190206005015460ff166110315760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b609e826040516110419190613643565b9081526040519081900360200190206009015460ff166001146110a65760405162461bcd60e51b815260206004820152601060248201527f506f6f6c3a206e6f7420616374697665000000000000000000000000000000006044820152606401610668565b609e826040516110b69190613643565b9081526020016040518091039020600701546110f584609e856040516110dc9190613643565b908152604051908190036020019020600a01549061266f565b11156111435760405162461bcd60e51b815260206004820152601160248201527f506f6f6c3a2063617020657863656465640000000000000000000000000000006044820152606401610668565b60008490506000816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561118357600080fd5b505afa158015611197573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111bb91906135fa565b6111c69060126139dc565b6111d190600a6138fb565b609e856040516111e19190613643565b9081526020016040518091039020600801546111fd91906139a6565b61120a86620f42406139a6565b6112149190613896565b9050609a548110156112685760405162461bcd60e51b815260206004820152601760248201527f4d696e696d616c20616d6f756e742072657175697265640000000000000000006044820152606401610668565b6112aa6040518060c0016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081525090565b3381526040808201879052602082018790526000606083015251609e906112d2908790613643565b9081526040805191829003602001909120600601546080830152600060a083015251609d90611302908790613643565b908152602001604051809103902060006113193390565b6001600160a01b0390811682526020808301939093526040918201600090812080546001808201835591835291859020865160069093020180546001600160a01b031916929093169190911782559284015192810192909255828101516002830155606083015160038301556080830151600483015560a0830151600590920191909155516113b2908790609e906110dc908990613643565b609e866040516113c29190613643565b908152604051908190036020019020600a01556113f66113df3390565b6097546001600160a01b0386811692911685612b5c565b7f70f42571e52a3d199e10403d607c0456c3ce8a36b0db2d126d05f22f62778922338789609e8960405161142a9190613643565b90815260200160405180910390206001015489609e8b60405161144d9190613643565b9081526040519081900360200181206008015461146e96959493929161366f565b60405180910390a15060019695505050505050565b8051602081830181018051609e825292820191909301209152805481906114a990613a2b565b80601f01602080910402602001604051908101604052809291908181526020018280546114d590613a2b565b80156115225780601f106114f757610100808354040283529160200191611522565b820191906000526020600020905b81548152906001019060200180831161150557829003601f168201915b50505060018401546002850154600386015460048701546005880154600689015460078a015460088b015460098c0154600a8d0154600b909d01549b9c989b979a50959850939660ff93841696929591949391909116918c565b600054610100900460ff161580801561159c5750600054600160ff909116105b806115b65750303b1580156115b6575060005460ff166001145b6116285760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610668565b6000805460ff19166001179055801561164b576000805461ff0019166101001790555b611653612b9a565b61165b612c0d565b609780546001600160a01b0319166001600160a01b038416179055620f4240609855336000908152609f60205260409020805460ff1916600117905580156116d9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610d60565b5050565b336000908152609f602052604090205460ff166117485760405162461bcd60e51b815260206004820152602360248201527f4f6e6c79206d616e616765722063616e2063616c6c20746869732066756e637460448201526234b7b760e91b6064820152608401610668565b609e838360405161175a92919061365f565b9081526040519081900360200190206005015460ff166117af5760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b60ff811615806117c257508060ff166001145b806117d057508060ff166002145b61181c5760405162461bcd60e51b815260206004820152600c60248201527f57726f6e672073746174757300000000000000000000000000000000000000006044820152606401610668565b80609e848460405161182f92919061365f565b908152604051908190036020019020600901805460ff9290921660ff19909216919091179055505050565b61186261268e565b6001600160a01b0381166118b85760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f77656400000000000000006044820152606401610668565b609780546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152609f602052604090205460ff166119455760405162461bcd60e51b815260206004820152602360248201527f4f6e6c79206d616e616765722063616e2063616c6c20746869732066756e637460448201526234b7b760e91b6064820152608401610668565b600061195384860186613209565b905060005b81518160ff1610156119f8576119e5828260ff168151811061197c5761197c613a9c565b602002602001015160000151838360ff168151811061199d5761199d613a9c565b60200260200101516020015186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ffa92505050565b50806119f081613a66565b915050611958565b505050505050565b6060609e8484604051611a1492919061365f565b9081526040519081900360200190206005015460ff16611a695760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b609d8484604051611a7b92919061365f565b9081526040805191829003602090810183206001600160a01b0386166000908152908252828120805480840286018401909452838552929184015b82821015611b275760008481526020908190206040805160c0810182526006860290920180546001600160a01b031683526001808201548486015260028201549284019290925260038101546060840152600481015460808401526005015460a08301529083529092019101611ab6565b5050505090509392505050565b6000609e8383604051611b4892919061365f565b9081526040519081900360200190206005015460ff16611b9d5760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b6000609d8484604051611bb192919061365f565b90815260200160405180910390206000611bc83390565b6001600160a01b03166001600160a01b031681526020019081526020016000208681548110611bf957611bf9613a9c565b906000526020600020906006020190506000816002015411611c5d5760405162461bcd60e51b815260206004820152601b60248201527f42656e656665636961727920646f6573206e6f742065786973747300000000006044820152606401610668565b6000611c92609e8686604051611c7492919061365f565b9081526040519081900360200190206001015460048401549061266f565b9050428110611ce35760405162461bcd60e51b815260206004820152600c60248201527f46756e6473206c6f636b656400000000000000000000000000000000000000006044820152606401610668565b600080611d27888a89898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061233e92505050565b60028601549193509150611d3b9083612682565b60028501556003840154611d4f908361266f565b600385015560058401819055609c546040516370a0823160e01b815230600482015283916001600160a01b0316906370a082319060240160206040518083038186803b158015611d9e57600080fd5b505afa158015611db2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd69190613593565b10158015611de45750600082115b611e305760405162461bcd60e51b815260206004820152601760248201527f57726f6e6720616d6f756e74206f722062616c616e63650000000000000000006044820152606401610668565b611e4733609c546001600160a01b031690846126e8565b611e7682609e8989604051611e5d92919061365f565b908152604051908190036020019020600b01549061266f565b609e8888604051611e8892919061365f565b908152604051908190036020019020600b01557f4ee0bce2f3dfb53dc0564ce5a7e1934da5c7866b06ba77f86c397b7b976a3144611ec33390565b604080516001600160a01b039092168252602082018590520160405180910390a160019450505050505b949350505050565b611efd61268e565b6001600160a01b038116611f795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610668565b611f828161277d565b50565b8251602081850181018051609d82529282018287012092905252600082815260409020805482908110611fb757600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0390941697509195509350919086565b336000908152609f602052604081205460ff166120655760405162461bcd60e51b815260206004820152602360248201527f4f6e6c79206d616e616765722063616e2063616c6c20746869732066756e637460448201526234b7b760e91b6064820152608401610668565b609e826040516120759190613643565b9081526040519081900360200190206005015460ff166120ca5760405162461bcd60e51b815260206004820152601060248201526f506f6f6c3a206e6f742065786973747360801b6044820152606401610668565b609e826040516120da9190613643565b90815260200160405180910390206007015461210084609e856040516110dc9190613643565b111561214e5760405162461bcd60e51b815260206004820152601160248201527f506f6f6c3a2063617020657863656465640000000000000000000000000000006044820152606401610668565b6121906040518060c0016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081525090565b6001600160a01b03851681526040808201859052602082018590526000606083015251609e906121c1908590613643565b9081526040805191829003602001909120600601546080830152600060a083015251609d906121f1908590613643565b9081526040805191829003602090810183206001600160a01b03808a1660009081529183528382208054600181810183559184529284902087516006909402018054939092166001600160a01b03199093169290921781559185015190820155908301516002820155606083015160038201556080830151600482015560a083015160059091015561228d908590609e906110dc908790613643565b609e8460405161229d9190613643565b9081526020016040518091039020600a01819055507f70f42571e52a3d199e10403d607c0456c3ce8a36b0db2d126d05f22f6277892285856000609e876040516122e79190613643565b90815260200160405180910390206001015487609e8960405161230a9190613643565b9081526040519081900360200181206008015461232b96959493929161366f565b60405180910390a1506001949350505050565b6000806000609d846040516123539190613643565b90815260200160405180910390206000876001600160a01b03166001600160a01b03168152602001908152602001600020858154811061239557612395613a9c565b600091825260208083206040805160c081018252600690940290910180546001600160a01b03168452600181015492840192909252600282015483820152600382015460608401526004820154608084015260059091015460a083015251909250609e90612404908790613643565b90815260200160405180910390206040518061018001604052908160008201805461242e90613a2b565b80601f016020809104026020016040519081016040528092919081815260200182805461245a90613a2b565b80156124a75780601f1061247c576101008083540402835291602001916124a7565b820191906000526020600020905b81548152906001019060200180831161248a57829003601f168201915b505050918352505060018201546020808301919091526002830154604080840191909152600384015460608401526004840154608080850191909152600585015460ff908116151560a0860152600686015460c0860152600786015460e08601526008860154610100860152600986015416610120850152600a850154610140850152600b909401546101609093019290925283810151918401516098549385015191870151949550919391926000929091612562916139a6565b61256c9190613896565b60608501516080870151919250904290612586908661266f565b111561259e5760008097509750505050505050612667565b60006125cb846125c56125be888b6080015161266f90919063ffffffff16565b4290612682565b90612c80565b90508181116125da57806125dc565b815b905060006125f78860a001518361268290919063ffffffff16565b9050828860a001511480156126265750600061262489606001518a6020015161268290919063ffffffff16565b115b15612650576060880151602089015161263e91612682565b82995099505050505050505050612667565b61265a8185612b50565b9950909750505050505050505b935093915050565b600061267b828461387e565b9392505050565b600061267b82846139c5565b6033546001600160a01b03163314610b705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610668565b6040516001600160a01b03831660248201526044810182905261277890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612c8c565b505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000609e896040516127e19190613643565b9081526040519081900360200190206005015460ff16156128445760405162461bcd60e51b815260206004820152601460248201527f506f6f6c3a20616c7265616479206578697374730000000000000000000000006044820152606401610668565b6098546128518787612b50565b111561289f5760405162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a2070657263656e7473206578636565646564206c696d69740000006044820152606401610668565b60408051602081019091526060815289609e8b6040516128bf9190613643565b908152602001604051809103902060000190805190602001906128e3929190612f7a565b5088609e8b6040516128f59190613643565b90815260200160405180910390206001018190555087609e8b60405161291b9190613643565b90815260200160405180910390206002018190555086609e8b6040516129419190613643565b90815260200160405180910390206003018190555085609e8b6040516129679190613643565b90815260200160405180910390206004018190555083609e8b60405161298d9190613643565b90815260200160405180910390206007018190555082609e8b6040516129b39190613643565b9081526020016040518091039020600801819055506001609e8b6040516129da9190613643565b908152604051908190036020018120600501805492151560ff19909316929092179091558590609e90612a0e908d90613643565b9081526020016040518091039020600601819055506000609e8b604051612a359190613643565b908152602001604051809103902060090160006101000a81548160ff021916908360ff1602179055506000609e8b604051612a709190613643565b9081526020016040518091039020600a01819055506000609e8b604051612a979190613643565b908152604051908190036020019020600b0155609954612ab890600161266f565b609955898152609b80546001810182556000919091528151805183927fbba9db4cdbea0a37c207bbb83e20f828cd4441c49891101dc94fd20dc8efc3490191612b0691839160200190612f7a565b5050507f228cfd215d48179cf899c57214fe4e201044cfde6ed6effd74c3e423715698da8a604051612b3891906137a5565b60405180910390a15060019998505050505050505050565b600061267b82846139a6565b6040516001600160a01b0380851660248301528316604482015260648101829052612b949085906323b872dd60e01b90608401612714565b50505050565b600054610100900460ff16612c055760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610668565b610b70612d74565b600054610100900460ff16612c785760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610668565b610b70612de6565b600061267b8284613896565b6000612ce1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612e5a9092919063ffffffff16565b9050805160001480612d02575080806020019051810190612d0291906132e1565b6127785760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610668565b600054610100900460ff16612ddf5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610668565b6001606555565b600054610100900460ff16612e515760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610668565b610b703361277d565b6060611eed848460008585600080866001600160a01b03168587604051612e819190613643565b60006040518083038185875af1925050503d8060008114612ebe576040519150601f19603f3d011682016040523d82523d6000602084013e612ec3565b606091505b5091509150612ed487838387612edf565b979650505050505050565b60608315612f4b578251612f44576001600160a01b0385163b612f445760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610668565b5081611eed565b611eed8383815115612f605781518083602001fd5b8060405162461bcd60e51b815260040161066891906137a5565b828054612f8690613a2b565b90600052602060002090601f016020900481019282612fa85760008555612fee565b82601f10612fc157805160ff1916838001178555612fee565b82800160010185558215612fee579182015b82811115612fee578251825591602001919060010190612fd3565b50612ffa929150612ffe565b5090565b5b80821115612ffa5760008155600101612fff565b80356001600160a01b038116811461302a57600080fd5b919050565b60008083601f84011261304157600080fd5b50813567ffffffffffffffff81111561305957600080fd5b60208301915083602082850101111561307157600080fd5b9250929050565b600082601f83011261308957600080fd5b813567ffffffffffffffff8111156130a3576130a3613ab2565b6130b6601f8201601f191660200161384d565b8181528460208386010111156130cb57600080fd5b816020850160208301376000918101602001919091529392505050565b6000602082840312156130fa57600080fd5b61267b82613013565b6000806040838503121561311657600080fd5b61311f83613013565b9150602083013561312f81613ac8565b809150509250929050565b6000806040838503121561314d57600080fd5b61315683613013565b9150602083013567ffffffffffffffff81111561317257600080fd5b61317e85828601613078565b9150509250929050565b6000806040838503121561319b57600080fd5b6131a483613013565b946020939093013593505050565b6000806000606084860312156131c757600080fd5b6131d084613013565b925060208401359150604084013567ffffffffffffffff8111156131f357600080fd5b6131ff86828701613078565b9150509250925092565b6000602080838503121561321c57600080fd5b823567ffffffffffffffff8082111561323457600080fd5b818501915085601f83011261324857600080fd5b81358181111561325a5761325a613ab2565b613268848260051b0161384d565b8181528481019250838501600683901b8501860189101561328857600080fd5b60009450845b838110156132d357604080838c0312156132a6578687fd5b6132ae613824565b6132b784613013565b815283890135898201528652948701949091019060010161328e565b509098975050505050505050565b6000602082840312156132f357600080fd5b815161267b81613ac8565b6000806000806040858703121561331457600080fd5b843567ffffffffffffffff8082111561332c57600080fd5b6133388883890161302f565b9096509450602087013591508082111561335157600080fd5b5061335e8782880161302f565b95989497509550505050565b60008060006040848603121561337f57600080fd5b833567ffffffffffffffff81111561339657600080fd5b6133a28682870161302f565b90945092506133b5905060208501613013565b90509250925092565b600080600080606085870312156133d457600080fd5b843567ffffffffffffffff8111156133eb57600080fd5b6133f78782880161302f565b909550935061340a905060208601613013565b9396929550929360400135925050565b60008060008060008060008060006101008a8c03121561343957600080fd5b893567ffffffffffffffff81111561345057600080fd5b61345c8c828d0161302f565b909d909c5060208c01359b60408101359b5060608101359a506080810135995060a0810135985060c0810135975060e0013595509350505050565b6000806000604084860312156134ac57600080fd5b833567ffffffffffffffff8111156134c357600080fd5b6134cf8682870161302f565b90945092505060208401356134e381613ad6565b809150509250925092565b60006020828403121561350057600080fd5b813567ffffffffffffffff81111561351757600080fd5b611eed84828501613078565b60008060006060848603121561353857600080fd5b833567ffffffffffffffff81111561354f57600080fd5b61355b86828701613078565b93505061356a60208501613013565b9150604084013590509250925092565b60006020828403121561358c57600080fd5b5035919050565b6000602082840312156135a557600080fd5b5051919050565b600080600080606085870312156135c257600080fd5b843593506135d260208601613013565b9250604085013567ffffffffffffffff8111156135ee57600080fd5b61335e8782880161302f565b60006020828403121561360c57600080fd5b815161267b81613ad6565b6000815180845261362f8160208601602086016139ff565b601f01601f19169290920160200192915050565b600082516136558184602087016139ff565b9190910192915050565b8183823760009101908152919050565b60006001600160a01b03808916835287602084015280871660408401525084606083015260c060808301526136a760c0830185613617565b90508260a0830152979650505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561372e57815180516001600160a01b0316855286810151878601528581015186860152606080820151908601526080808201519086015260a0908101519085015260c090930192908501906001016136d7565b5091979650505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561379857878503603f1901845281515186865261378587870182613617565b9550509285019290850190600101613762565b5092979650505050505050565b60208152600061267b6020830184613617565b610180815260006137cd61018083018f613617565b602083019d909d5250604081019a909a5260608a0198909852608089019690965293151560a088015260c087019290925260e086015261010085015260ff1661012084015261014083015261016090910152919050565b6040805190810167ffffffffffffffff8111828210171561384757613847613ab2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561387657613876613ab2565b604052919050565b6000821982111561389157613891613a86565b500190565b6000826138b357634e487b7160e01b600052601260045260246000fd5b500490565b600181815b808511156138f35781600019048211156138d9576138d9613a86565b808516156138e657918102915b93841c93908002906138bd565b509250929050565b600061267b60ff841683600082613914575060016108fd565b81613921575060006108fd565b816001811461393757600281146139415761395d565b60019150506108fd565b60ff84111561395257613952613a86565b50506001821b6108fd565b5060208310610133831016604e8410600b8410161715613980575081810a6108fd565b61398a83836138b8565b806000190482111561399e5761399e613a86565b029392505050565b60008160001904831182151516156139c0576139c0613a86565b500290565b6000828210156139d7576139d7613a86565b500390565b600060ff821660ff8416808210156139f6576139f6613a86565b90039392505050565b60005b83811015613a1a578181015183820152602001613a02565b83811115612b945750506000910152565b600181811c90821680613a3f57607f821691505b60208210811415613a6057634e487b7160e01b600052602260045260246000fd5b50919050565b600060ff821660ff811415613a7d57613a7d613a86565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114611f8257600080fd5b60ff81168114611f8257600080fdfea26469706673582212205eb1e7ceda48fc4802f0a7cacecb4efe954ac06be2407121b47141172e8ab7c964736f6c63430008070033
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.