More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 303 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 18086638 | 521 days ago | IN | 0 ETH | 0.00255492 | ||||
Withdraw And Har... | 15022939 | 961 days ago | IN | 0 ETH | 0.00283765 | ||||
Withdraw And Har... | 14898605 | 982 days ago | IN | 0 ETH | 0.00736302 | ||||
Withdraw And Har... | 14825859 | 994 days ago | IN | 0 ETH | 0.00515715 | ||||
Withdraw And Har... | 14806848 | 997 days ago | IN | 0 ETH | 0.00406087 | ||||
Withdraw And Har... | 14699362 | 1014 days ago | IN | 0 ETH | 0.01206412 | ||||
Withdraw And Har... | 14621308 | 1026 days ago | IN | 0 ETH | 0.00379532 | ||||
Withdraw And Har... | 14621308 | 1026 days ago | IN | 0 ETH | 0.00300493 | ||||
Withdraw And Har... | 14610058 | 1028 days ago | IN | 0 ETH | 0.00599322 | ||||
Withdraw And Har... | 14582737 | 1033 days ago | IN | 0 ETH | 0.00286687 | ||||
Withdraw And Har... | 14525364 | 1041 days ago | IN | 0 ETH | 0.00550145 | ||||
Withdraw And Har... | 14519327 | 1042 days ago | IN | 0 ETH | 0.00618907 | ||||
Withdraw And Har... | 14479980 | 1049 days ago | IN | 0 ETH | 0.00383937 | ||||
Withdraw And Har... | 14467837 | 1050 days ago | IN | 0 ETH | 0.00213641 | ||||
Withdraw And Har... | 14457548 | 1052 days ago | IN | 0 ETH | 0.00792922 | ||||
Withdraw And Har... | 14457189 | 1052 days ago | IN | 0 ETH | 0.00626205 | ||||
Withdraw And Har... | 14455644 | 1052 days ago | IN | 0 ETH | 0.00301332 | ||||
Withdraw And Har... | 14430080 | 1056 days ago | IN | 0 ETH | 0.00495948 | ||||
Withdraw And Har... | 14421569 | 1058 days ago | IN | 0 ETH | 0.0021482 | ||||
Withdraw And Har... | 14420009 | 1058 days ago | IN | 0 ETH | 0.0024474 | ||||
Withdraw And Har... | 14403366 | 1061 days ago | IN | 0 ETH | 0.0026305 | ||||
Withdraw And Har... | 14399647 | 1061 days ago | IN | 0 ETH | 0.00445424 | ||||
Withdraw And Har... | 14397115 | 1061 days ago | IN | 0 ETH | 0.00338125 | ||||
Withdraw And Har... | 14395782 | 1062 days ago | IN | 0 ETH | 0.00204031 | ||||
Withdraw And Har... | 14392558 | 1062 days ago | IN | 0 ETH | 0.00749038 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
LiquidityMining
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./libraries/SignedSafeMath.sol"; import "./token/STRM.sol"; /// @title LiquidityMining /// @notice /// @dev contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeMath for uint128; using SafeERC20 for IERC20; using SignedSafeMath for int256; /// @notice Info of each masterchef user. /// `amount` LP token amount the user has provided. /// `rewardDebt` The amount of INSTRUMENTAL entitled to the user. /// `locked` locked for the first 3 months of liquidity mining, enjoy a 2 times boost struct UserInfo { uint256 amount; int256 rewardDebt; } /// @notice Info of each LM pool. /// `allocPoint` The amount of allocation points assigned to the pool. /// Also known as the amount of INSTRUMENTAL to distribute per block. struct PoolInfo { uint256 accInstrumentalPerShare; uint64 lastRewardBlock; uint64 end; bool locked; uint256 instrumentalPerBlock; uint256 supply; } /// @notice Address of INSTRUMENTAL contract. STRM public immutable INSTRUMENTAL; /// @notice keep track of how much rewards needs to be distributed uint256 internal claimableRewards = 0; /// @notice Info of each LM pool. PoolInfo[] public poolInfo; /// @notice Address of the LP token for each LiquidityMining pool. IERC20[] public lpToken; /// @notice Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; /// @notice uint256 private constant ACC_INST_PRECISION = 1e12; // @notice Pool expiration in blocks (4 months at an average of 13 seconds per block) uint256 private constant POOL_EXPIRATION = 800_000; event Deposit(address indexed user, uint256 indexed pid, uint256 amount, address indexed to); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount, address indexed to); event EmergencyWithdraw( address indexed user, uint256 indexed pid, uint256 amount, address indexed to ); event Harvest(address indexed user, uint256 indexed pid, uint256 amount); event LogPoolAddition( uint256 indexed pid, uint256 instrumentalPerBlock, IERC20 indexed lpToken ); event LogSetPool(uint256 indexed pid, uint256 instrumentalPerBlock); event LogUpdatePool( uint256 indexed pid, uint64 lastRewardBlock, uint256 lpSupply, uint256 accInstrumentalPerShare ); event LogInit(); /// @dev modifier onlyUnlocked(uint256 pid) { require(_isLocked(pid) == false, "LiquidityMining: ONLY_UNLOCKED"); _; } /// @notice /// @dev /// @param _instrumental () constructor(STRM _instrumental) { INSTRUMENTAL = _instrumental; } function _isLocked(uint256 pid) internal view returns (bool) { PoolInfo memory pool = poolInfo[pid]; return (pool.locked == true && pool.end > block.number); } function _arePoolExpired() internal view returns (bool) { uint256 end = 0; for (uint256 i = 0; i < poolInfo.length; ++i) { end = poolInfo[i].end > end ? poolInfo[i].end : end; } return block.number > end + POOL_EXPIRATION; } /// @notice Returns the number of LM pools. /// @notice /// @dev /// @return pools (uint256) function poolLength() public view returns (uint256 pools) { pools = poolInfo.length; } /// @notice Add a new LP to the pool. Can only be called by the owner. function add( uint256 instrumentalPerBlock, IERC20 _lpToken, uint64 end, bool locked ) public onlyOwner { uint256 maxRewards = uint256(end).sub(block.number).mul(instrumentalPerBlock); require( INSTRUMENTAL.balanceOf(address(this)) >= maxRewards + claimableRewards, "LM: Insufficient funds" ); claimableRewards += maxRewards; lpToken.push(_lpToken); poolInfo.push( PoolInfo({ accInstrumentalPerShare: 0, lastRewardBlock: uint64(block.number), end: end, locked: locked, instrumentalPerBlock: instrumentalPerBlock, supply: 0 }) ); emit LogPoolAddition(lpToken.length.sub(1), instrumentalPerBlock, _lpToken); } /// @notice Update the given pool's INSTRUMENTAL allocation point. Can only be called by the owner. /// @param _pid The index of the pool. See `poolInfo`. /// @param _instrumentalPerBlock New rewards of the pool. /// disabled for now // function set(uint256 _pid, uint256 _instrumentalPerBlock) public onlyOwner { // poolInfo[_pid].instrumentalPerBlock = _instrumentalPerBlock; // emit LogSetPool(_pid, _instrumentalPerBlock); // } /// @notice View function to see pending INSTRUMENTAL on frontend. /// @param _pid The index of the pool. See `poolInfo`. /// @param _user Address of user. /// @return pending INSTRUMENTAL reward for a given user. function pendingInstrumental(uint256 _pid, address _user) external view returns (uint256 pending) { PoolInfo memory pool = poolInfo[_pid]; UserInfo memory user = userInfo[_pid][_user]; uint256 accInstrumentalPerShare = pool.accInstrumentalPerShare; if (block.number > pool.lastRewardBlock && pool.supply != 0) { uint256 lastValidBlock = block.number > pool.end ? pool.end : block.number; uint256 blocks = lastValidBlock.sub(pool.lastRewardBlock); uint256 sushiReward = blocks.mul(pool.instrumentalPerBlock); accInstrumentalPerShare = accInstrumentalPerShare.add( sushiReward.mul(ACC_INST_PRECISION) / pool.supply ); } pending = int256(user.amount.mul(accInstrumentalPerShare) / ACC_INST_PRECISION) .sub(user.rewardDebt) .toUInt256(); } function withdrawLeftovers() public onlyOwner { require(_arePoolExpired() == false, "LM: Pools are not expired"); INSTRUMENTAL.transfer(msg.sender, INSTRUMENTAL.balanceOf(address(this))); } /// @notice Update reward variables for all pools. Be careful of gas spending! /// @param pids Pool IDs of all to be updated. Make sure to update all active pools. function massUpdatePools(uint256[] calldata pids) external { uint256 len = pids.length; for (uint256 i = 0; i < len; ++i) { updatePool(pids[i]); } } /// @notice Update reward variables of the given pool. /// @param pid The index of the pool. See `poolInfo`. /// @return pool Returns the pool that was updated. function updatePool(uint256 pid) public returns (PoolInfo memory pool) { pool = poolInfo[pid]; if (block.number > pool.lastRewardBlock && pool.lastRewardBlock < pool.end) { uint256 lastValidBlock = block.number > pool.end ? pool.end : block.number; if (pool.supply > 0) { uint256 blocks = lastValidBlock.sub(pool.lastRewardBlock); uint256 sushiReward = blocks.mul(pool.instrumentalPerBlock); // mint additional tokens @todo should I mint them or not? // INSTRUMENTAL.mint(address(this), sushiReward); uint256 rewardFactor = sushiReward.mul(ACC_INST_PRECISION) / pool.supply; pool.accInstrumentalPerShare = pool.accInstrumentalPerShare.add(rewardFactor); pool.lastRewardBlock = uint64(lastValidBlock); } poolInfo[pid] = pool; emit LogUpdatePool( pid, pool.lastRewardBlock, pool.supply, pool.accInstrumentalPerShare ); } } /// @notice Deposit LP tokens to LM for INSTRUMENTAL allocation. /// @param pid The index of the pool. See `poolInfo`. /// @param amount LP token amount to deposit. /// @param to The receiver of `amount` deposit benefit. function deposit( uint256 pid, uint256 amount, address to ) public { updatePool(pid); UserInfo storage user = userInfo[pid][to]; PoolInfo storage pool = poolInfo[pid]; // Effects user.amount = user.amount.add(amount); user.rewardDebt = user.rewardDebt.add( int256(amount.mul(pool.accInstrumentalPerShare) / ACC_INST_PRECISION) ); pool.supply = pool.supply.add(amount); lpToken[pid].safeTransferFrom(msg.sender, address(this), amount); emit Deposit(msg.sender, pid, amount, to); } /// @notice Withdraw LP tokens from LM. /// @param pid The index of the pool. See `poolInfo`. /// @param amount LP token amount to withdraw. /// @param to Receiver of the LP tokens. function withdraw( uint256 pid, uint256 amount, address to ) public onlyUnlocked(pid) { updatePool(pid); UserInfo storage user = userInfo[pid][msg.sender]; PoolInfo storage pool = poolInfo[pid]; // Effects user.rewardDebt = user.rewardDebt.sub( int256(amount.mul(pool.accInstrumentalPerShare) / ACC_INST_PRECISION) ); user.amount = user.amount.sub(amount); pool.supply = pool.supply.sub(amount); lpToken[pid].safeTransfer(to, amount); emit Withdraw(msg.sender, pid, amount, to); } /// @notice Harvest proceeds for transaction sender to `to`. /// @param pid The index of the pool. See `poolInfo`. /// @param to Receiver of INSTRUMENTAL rewards. function harvest(uint256 pid, address to) public onlyUnlocked(pid) { PoolInfo memory pool = updatePool(pid); UserInfo storage user = userInfo[pid][msg.sender]; require(_arePoolExpired() == false, "LM: Pool has expired"); int256 accumulatedInstrumental = int256( user.amount.mul(pool.accInstrumentalPerShare) / ACC_INST_PRECISION ); uint256 _pendingRewards = accumulatedInstrumental.sub(user.rewardDebt).toUInt256(); // Effects user.rewardDebt = accumulatedInstrumental; // Interactions if (_pendingRewards != 0) { claimableRewards -= _pendingRewards; INSTRUMENTAL.transfer(to, _pendingRewards); } emit Harvest(msg.sender, pid, _pendingRewards); } /// @notice Withdraw LP tokens from LM and harvest proceeds for transaction sender to `to`. /// @param pid The index of the pool. See `poolInfo`. /// @param amount LP token amount to withdraw. /// @param to Receiver of the LP tokens and INSTRUMENTAL rewards. function withdrawAndHarvest( uint256 pid, uint256 amount, address to ) public onlyUnlocked(pid) { updatePool(pid); UserInfo storage user = userInfo[pid][msg.sender]; PoolInfo storage pool = poolInfo[pid]; require(_arePoolExpired() == false, "LM: Pool has expired"); int256 accumulatedInstrumental = int256( user.amount.mul(pool.accInstrumentalPerShare) / ACC_INST_PRECISION ); uint256 _pendingReward = accumulatedInstrumental.sub(user.rewardDebt).toUInt256(); // Effects user.rewardDebt = accumulatedInstrumental.sub( int256(amount.mul(pool.accInstrumentalPerShare) / ACC_INST_PRECISION) ); user.amount = user.amount.sub(amount); pool.supply = pool.supply.sub(amount); // Interactions claimableRewards -= _pendingReward; INSTRUMENTAL.transfer(to, _pendingReward); lpToken[pid].safeTransfer(to, amount); emit Withdraw(msg.sender, pid, amount, to); emit Harvest(msg.sender, pid, _pendingReward); } /// @notice Withdraw without caring about rewards. EMERGENCY ONLY. /// @param pid The index of the pool. See `poolInfo`. /// @param to Receiver of the LP tokens. function emergencyWithdraw(uint256 pid, address to) public onlyUnlocked(pid) { UserInfo storage user = userInfo[pid][msg.sender]; PoolInfo storage pool = poolInfo[pid]; uint256 amount = user.amount; user.amount = 0; user.rewardDebt = 0; pool.supply = pool.supply.sub(amount); // Note: transfer can fail or succeed if `amount` is zero. lpToken[pid].safeTransfer(to, amount); emit EmergencyWithdraw(msg.sender, pid, amount, to); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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 SafeMath { /** * @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 substraction 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; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; library SignedSafeMath { int256 constant private _INT256_MIN = -2**255; /** * @dev Returns the multiplication of two signed integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { // 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 0; } require(!(a == -1 && b == _INT256_MIN), "SignedSafeMath: multiplication overflow"); int256 c = a * b; require(c / a == b, "SignedSafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two signed integers. Reverts 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(int256 a, int256 b) internal pure returns (int256) { require(b != 0, "SignedSafeMath: division by zero"); require(!(b == -1 && a == _INT256_MIN), "SignedSafeMath: division overflow"); int256 c = a / b; return c; } /** * @dev Returns the subtraction of two signed integers, reverting on * overflow. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a), "SignedSafeMath: subtraction overflow"); return c; } /** * @dev Returns the addition of two signed integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a), "SignedSafeMath: addition overflow"); return c; } function toUInt256(int256 a) internal pure returns (uint256) { require(a >= 0, "Integer < 0"); return uint256(a); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol"; /// @title Instrumental Token ERC20 token contract contract STRM is ERC20Permit { constructor( string memory name_, string memory symbol_, uint256 totalSupply_ ) ERC20(name_, symbol_) ERC20Permit(name_) { _mint(msg.sender, totalSupply_); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev 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) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/draft-ERC20Permit.sol) pragma solidity ^0.8.0; import "./draft-IERC20Permit.sol"; import "../ERC20.sol"; import "../../../utils/cryptography/draft-EIP712.sol"; import "../../../utils/cryptography/ECDSA.sol"; import "../../../utils/Counters.sol"; /** * @dev Implementation 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. * * _Available since v3.4._ */ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 { using Counters for Counters.Counter; mapping(address => Counters.Counter) private _nonces; // solhint-disable-next-line var-name-mixedcase bytes32 private immutable _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /** * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. * * It's a good idea to use the same `name` that is defined as the ERC20 token name. */ constructor(string memory name) EIP712(name, "1") {} /** * @dev See {IERC20Permit-permit}. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual override { require(block.timestamp <= deadline, "ERC20Permit: expired deadline"); bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSA.recover(hash, v, r, s); require(signer == owner, "ERC20Permit: invalid signature"); _approve(owner, spender, value); } /** * @dev See {IERC20Permit-nonces}. */ function nonces(address owner) public view virtual override returns (uint256) { return _nonces[owner].current(); } /** * @dev See {IERC20Permit-DOMAIN_SEPARATOR}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view override returns (bytes32) { return _domainSeparatorV4(); } /** * @dev "Consume a nonce": return the current value and increment. * * _Available since v4.1._ */ function _useNonce(address owner) internal virtual returns (uint256 current) { Counters.Counter storage nonce = _nonces[owner]; current = nonce.current(); nonce.increment(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/cryptography/draft-EIP712.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract STRM","name":"_instrumental","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvest","type":"event"},{"anonymous":false,"inputs":[],"name":"LogInit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"instrumentalPerBlock","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"lpToken","type":"address"}],"name":"LogPoolAddition","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"instrumentalPerBlock","type":"uint256"}],"name":"LogSetPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"lastRewardBlock","type":"uint64"},{"indexed":false,"internalType":"uint256","name":"lpSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accInstrumentalPerShare","type":"uint256"}],"name":"LogUpdatePool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"INSTRUMENTAL","outputs":[{"internalType":"contract STRM","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"instrumentalPerBlock","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"uint64","name":"end","type":"uint64"},{"internalType":"bool","name":"locked","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lpToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"pids","type":"uint256[]"}],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingInstrumental","outputs":[{"internalType":"uint256","name":"pending","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"uint256","name":"accInstrumentalPerShare","type":"uint256"},{"internalType":"uint64","name":"lastRewardBlock","type":"uint64"},{"internalType":"uint64","name":"end","type":"uint64"},{"internalType":"bool","name":"locked","type":"bool"},{"internalType":"uint256","name":"instrumentalPerBlock","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"pools","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"}],"name":"updatePool","outputs":[{"components":[{"internalType":"uint256","name":"accInstrumentalPerShare","type":"uint256"},{"internalType":"uint64","name":"lastRewardBlock","type":"uint64"},{"internalType":"uint64","name":"end","type":"uint64"},{"internalType":"bool","name":"locked","type":"bool"},{"internalType":"uint256","name":"instrumentalPerBlock","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"}],"internalType":"struct LiquidityMining.PoolInfo","name":"pool","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"int256","name":"rewardDebt","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawAndHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawLeftovers","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405260006001553480156200001657600080fd5b50604051620039803803806200398083398181016040528101906200003c9190620001e1565b6200005c620000506200009760201b60201c565b6200009f60201b60201c565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505062000213565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001958262000168565b9050919050565b6000620001a98262000188565b9050919050565b620001bb816200019c565b8114620001c757600080fd5b50565b600081519050620001db81620001b0565b92915050565b600060208284031215620001fa57620001f962000163565b5b60006200020a84828501620001ca565b91505092915050565b60805161372e620002526000396000818161059c015281816107bc01528181610b6a01528181610ba7015281816116490152611b37015261372e6000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806357a5b58c116100a25780638dbdbe6d116100715780638dbdbe6d146102be57806393f1a40b146102da578063b060976f1461030b578063d1abb90714610327578063f2fde38b1461034357610116565b806357a5b58c1461024a578063715018a61461026657806378ed5d1f146102705780638da5cb5b146102a057610116565b806318fccc76116100e957806318fccc76146101a85780632f940c70146101c457806332c764b9146101e05780634115671f146101ea57806351eb05a61461021a57610116565b8063081e3eda1461011b5780630ad58d2f146101395780631173fa47146101555780631526fe2714610173575b600080fd5b61012361035f565b6040516101309190612614565b60405180910390f35b610153600480360381019061014e91906126c3565b61036c565b005b61015d61059a565b60405161016a9190612775565b60405180910390f35b61018d60048036038101906101889190612790565b6105be565b60405161019f969594939291906127fb565b60405180910390f35b6101c260048036038101906101bd919061285c565b61063f565b005b6101de60048036038101906101d9919061285c565b6108c1565b005b6101e8610a9e565b005b61020460048036038101906101ff919061285c565b610cc0565b6040516102119190612614565b60405180910390f35b610234600480360381019061022f9190612790565b610f30565b6040516102419190612944565b60405180910390f35b610264600480360381019061025f91906129c4565b61123d565b005b61026e61128a565b005b61028a60048036038101906102859190612790565b611312565b6040516102979190612a32565b60405180910390f35b6102a8611351565b6040516102b59190612a5c565b60405180910390f35b6102d860048036038101906102d391906126c3565b61137a565b005b6102f460048036038101906102ef919061285c565b611559565b604051610302929190612a90565b60405180910390f35b61032560048036038101906103209190612b4f565b61158a565b005b610341600480360381019061033c91906126c3565b611929565b005b61035d60048036038101906103589190612bb6565b611d0b565b005b6000600280549050905090565b826000151561037a82611e03565b1515146103bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b390612c40565b60405180910390fd5b6103c584610f30565b5060006004600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600286815481106104305761042f612c60565b5b9060005260206000209060040201905061047d64e8d4a51000610460836000015488611eff90919063ffffffff16565b61046a9190612ced565b8360010154611f1590919063ffffffff16565b826001018190555061049c858360000154611f9690919063ffffffff16565b82600001819055506104bb858260030154611f9690919063ffffffff16565b816003018190555061052c8486600389815481106104dc576104db612c60565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611fac9092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff16863373ffffffffffffffffffffffffffffffffffffffff167f8166bf25f8a2b7ed3c85049207da4358d16edbed977d23fa2ee6f0dde3ec21328860405161058a9190612614565b60405180910390a4505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600281815481106105ce57600080fd5b90600052602060002090600402016000915090508060000154908060010160009054906101000a900467ffffffffffffffff16908060010160089054906101000a900467ffffffffffffffff16908060010160109054906101000a900460ff16908060020154908060030154905086565b816000151561064d82611e03565b15151461068f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068690612c40565b60405180910390fd5b600061069a84610f30565b905060006004600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600015156106fc612032565b15151461073e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073590612d6a565b60405180910390fd5b600064e8d4a5100061076184600001518460000154611eff90919063ffffffff16565b61076b9190612ced565b9050600061078e610789846001015484611f1590919063ffffffff16565b612109565b9050818360010181905550600081146108695780600160008282546107b39190612d8a565b925050819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87836040518363ffffffff1660e01b8152600401610815929190612dbe565b602060405180830381600087803b15801561082f57600080fd5b505af1158015610843573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108679190612dfc565b505b863373ffffffffffffffffffffffffffffffffffffffff167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954836040516108b09190612614565b60405180910390a350505050505050565b81600015156108cf82611e03565b151514610911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090890612c40565b60405180910390fd5b60006004600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060006002858154811061097b5761097a612c60565b5b9060005260206000209060040201905060008260000154905060008360000181905550600083600101819055506109bf818360030154611f9690919063ffffffff16565b8260030181905550610a308582600389815481106109e0576109df612c60565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611fac9092919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff16863373ffffffffffffffffffffffffffffffffffffffff167f2cac5e20e1541d836381527a43f651851e302817b71dc8e810284e69210c1c6b84604051610a8e9190612614565b60405180910390a4505050505050565b610aa6612156565b73ffffffffffffffffffffffffffffffffffffffff16610ac4611351565b73ffffffffffffffffffffffffffffffffffffffff1614610b1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1190612e75565b60405180910390fd5b60001515610b26612032565b151514610b68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5f90612ee1565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610bfe9190612a5c565b60206040518083038186803b158015610c1657600080fd5b505afa158015610c2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4e9190612f16565b6040518363ffffffff1660e01b8152600401610c6b929190612dbe565b602060405180830381600087803b158015610c8557600080fd5b505af1158015610c99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbd9190612dfc565b50565b60008060028481548110610cd757610cd6612c60565b5b90600052602060002090600402016040518060c0016040529081600082015481526020016001820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160109054906101000a900460ff1615151515815260200160028201548152602001600382015481525050905060006004600086815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020604051806040016040529081600082015481526020016001820154815250509050600082600001519050826020015167ffffffffffffffff1643118015610e2d575060008360a0015114155b15610ee0576000836040015167ffffffffffffffff164311610e4f5743610e5f565b836040015167ffffffffffffffff165b90506000610e84856020015167ffffffffffffffff1683611f9690919063ffffffff16565b90506000610e9f866080015183611eff90919063ffffffff16565b9050610eda8660a00151610ec164e8d4a5100084611eff90919063ffffffff16565b610ecb9190612ced565b8561215e90919063ffffffff16565b93505050505b610f25610f20836020015164e8d4a51000610f08858760000151611eff90919063ffffffff16565b610f129190612ced565b611f1590919063ffffffff16565b612109565b935050505092915050565b610f386125af565b60028281548110610f4c57610f4b612c60565b5b90600052602060002090600402016040518060c0016040529081600082015481526020016001820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160109054906101000a900460ff16151515158152602001600282015481526020016003820154815250509050806020015167ffffffffffffffff164311801561103c5750806040015167ffffffffffffffff16816020015167ffffffffffffffff16105b15611238576000816040015167ffffffffffffffff16431161105e574361106e565b816040015167ffffffffffffffff165b905060008260a00151111561112c5760006110a0836020015167ffffffffffffffff1683611f9690919063ffffffff16565b905060006110bb846080015183611eff90919063ffffffff16565b905060008460a001516110dc64e8d4a5100084611eff90919063ffffffff16565b6110e69190612ced565b90506110ff81866000015161215e90919063ffffffff16565b85600001818152505083856020019067ffffffffffffffff16908167ffffffffffffffff16815250505050505b816002848154811061114157611140612c60565b5b90600052602060002090600402016000820151816000015560208201518160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060408201518160010160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060608201518160010160106101000a81548160ff0219169083151502179055506080820151816002015560a08201518160030155905050827f0fc9545022a542541ad085d091fb09a2ab36fee366a4576ab63714ea907ad35383602001518460a00151856000015160405161122e93929190612f43565b60405180910390a2505b919050565b600082829050905060005b818110156112845761127284848381811061126657611265612c60565b5b90506020020135610f30565b508061127d90612f7a565b9050611248565b50505050565b611292612156565b73ffffffffffffffffffffffffffffffffffffffff166112b0611351565b73ffffffffffffffffffffffffffffffffffffffff1614611306576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fd90612e75565b60405180910390fd5b6113106000612174565b565b6003818154811061132257600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61138383610f30565b5060006004600085815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600285815481106113ee576113ed612c60565b5b9060005260206000209060040201905061141584836000015461215e90919063ffffffff16565b826000018190555061145a64e8d4a5100061143d836000015487611eff90919063ffffffff16565b6114479190612ced565b836001015461223890919063ffffffff16565b826001018190555061147984826003015461215e90919063ffffffff16565b81600301819055506114ec3330866003898154811061149b5761149a612c60565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166122b9909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff16853373ffffffffffffffffffffffffffffffffffffffff167f02d7e648dd130fc184d383e55bb126ac4c9c60e8f94bf05acdf557ba2d540b478760405161154a9190612614565b60405180910390a45050505050565b6004602052816000526040600020602052806000526040600020600091509150508060000154908060010154905082565b611592612156565b73ffffffffffffffffffffffffffffffffffffffff166115b0611351565b73ffffffffffffffffffffffffffffffffffffffff1614611606576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fd90612e75565b60405180910390fd5b600061163785611629438667ffffffffffffffff16611f9690919063ffffffff16565b611eff90919063ffffffff16565b9050600154816116479190612fc3565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016116a09190612a5c565b60206040518083038186803b1580156116b857600080fd5b505afa1580156116cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f09190612f16565b1015611731576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172890613065565b60405180910390fd5b80600160008282546117439190612fc3565b925050819055506003849080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060026040518060c00160405280600081526020014367ffffffffffffffff1681526020018567ffffffffffffffff1681526020018415158152602001878152602001600081525090806001815401808255809150506001900390600052602060002090600402016000909190919091506000820151816000015560208201518160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060408201518160010160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060608201518160010160106101000a81548160ff0219169083151502179055506080820151816002015560a0820151816003015550508373ffffffffffffffffffffffffffffffffffffffff166118eb6001600380549050611f9690919063ffffffff16565b7f4710feb78e3bce8d2e3ca2989a8eb2f8bcd32a6a55b4535942c180fc4d2e29528760405161191a9190612614565b60405180910390a35050505050565b826000151561193782611e03565b151514611979576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197090612c40565b60405180910390fd5b61198284610f30565b5060006004600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600286815481106119ed576119ec612c60565b5b9060005260206000209060040201905060001515611a09612032565b151514611a4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4290612d6a565b60405180910390fd5b600064e8d4a51000611a6e83600001548560000154611eff90919063ffffffff16565b611a789190612ced565b90506000611a9b611a96856001015484611f1590919063ffffffff16565b612109565b9050611ad664e8d4a51000611abd85600001548a611eff90919063ffffffff16565b611ac79190612ced565b83611f1590919063ffffffff16565b8460010181905550611af5878560000154611f9690919063ffffffff16565b8460000181905550611b14878460030154611f9690919063ffffffff16565b83600301819055508060016000828254611b2e9190612d8a565b925050819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87836040518363ffffffff1660e01b8152600401611b90929190612dbe565b602060405180830381600087803b158015611baa57600080fd5b505af1158015611bbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be29190612dfc565b50611c4c868860038b81548110611bfc57611bfb612c60565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611fac9092919063ffffffff16565b8573ffffffffffffffffffffffffffffffffffffffff16883373ffffffffffffffffffffffffffffffffffffffff167f8166bf25f8a2b7ed3c85049207da4358d16edbed977d23fa2ee6f0dde3ec21328a604051611caa9190612614565b60405180910390a4873373ffffffffffffffffffffffffffffffffffffffff167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae066092495483604051611cf99190612614565b60405180910390a35050505050505050565b611d13612156565b73ffffffffffffffffffffffffffffffffffffffff16611d31611351565b73ffffffffffffffffffffffffffffffffffffffff1614611d87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7e90612e75565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611df7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dee906130f7565b60405180910390fd5b611e0081612174565b50565b60008060028381548110611e1a57611e19612c60565b5b90600052602060002090600402016040518060c0016040529081600082015481526020016001820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160109054906101000a900460ff161515151581526020016002820154815260200160038201548152505090506001151581606001511515148015611ef7575043816040015167ffffffffffffffff16115b915050919050565b60008183611f0d9190613117565b905092915050565b6000808284611f249190613171565b905060008312158015611f375750838113155b80611f4d5750600083128015611f4c57508381135b5b611f8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f8390613277565b60405180910390fd5b8091505092915050565b60008183611fa49190612d8a565b905092915050565b61202d8363a9059cbb60e01b8484604051602401611fcb929190612dbe565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612342565b505050565b6000806000905060005b6002805490508110156120f157816002828154811061205e5761205d612c60565b5b906000526020600020906004020160010160089054906101000a900467ffffffffffffffff1667ffffffffffffffff161161209957816120de565b600281815481106120ad576120ac612c60565b5b906000526020600020906004020160010160089054906101000a900467ffffffffffffffff1667ffffffffffffffff165b9150806120ea90612f7a565b905061203c565b50620c3500816121019190612fc3565b431191505090565b60008082121561214e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612145906132e3565b60405180910390fd5b819050919050565b600033905090565b6000818361216c9190612fc3565b905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008082846122479190613303565b90506000831215801561225a5750838112155b80612270575060008312801561226f57508381125b5b6122af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122a690613409565b60405180910390fd5b8091505092915050565b61233c846323b872dd60e01b8585856040516024016122da93929190613429565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612342565b50505050565b60006123a4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166124099092919063ffffffff16565b905060008151111561240457808060200190518101906123c49190612dfc565b612403576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123fa906134d2565b60405180910390fd5b5b505050565b60606124188484600085612421565b90509392505050565b606082471015612466576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245d90613564565b60405180910390fd5b61246f85612535565b6124ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124a5906135d0565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516124d7919061366a565b60006040518083038185875af1925050503d8060008114612514576040519150601f19603f3d011682016040523d82523d6000602084013e612519565b606091505b5091509150612529828286612548565b92505050949350505050565b600080823b905060008111915050919050565b60608315612558578290506125a8565b60008351111561256b5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161259f91906136d6565b60405180910390fd5b9392505050565b6040518060c0016040528060008152602001600067ffffffffffffffff168152602001600067ffffffffffffffff16815260200160001515815260200160008152602001600081525090565b6000819050919050565b61260e816125fb565b82525050565b60006020820190506126296000830184612605565b92915050565b600080fd5b600080fd5b612642816125fb565b811461264d57600080fd5b50565b60008135905061265f81612639565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061269082612665565b9050919050565b6126a081612685565b81146126ab57600080fd5b50565b6000813590506126bd81612697565b92915050565b6000806000606084860312156126dc576126db61262f565b5b60006126ea86828701612650565b93505060206126fb86828701612650565b925050604061270c868287016126ae565b9150509250925092565b6000819050919050565b600061273b61273661273184612665565b612716565b612665565b9050919050565b600061274d82612720565b9050919050565b600061275f82612742565b9050919050565b61276f81612754565b82525050565b600060208201905061278a6000830184612766565b92915050565b6000602082840312156127a6576127a561262f565b5b60006127b484828501612650565b91505092915050565b600067ffffffffffffffff82169050919050565b6127da816127bd565b82525050565b60008115159050919050565b6127f5816127e0565b82525050565b600060c0820190506128106000830189612605565b61281d60208301886127d1565b61282a60408301876127d1565b61283760608301866127ec565b6128446080830185612605565b61285160a0830184612605565b979650505050505050565b600080604083850312156128735761287261262f565b5b600061288185828601612650565b9250506020612892858286016126ae565b9150509250929050565b6128a5816125fb565b82525050565b6128b4816127bd565b82525050565b6128c3816127e0565b82525050565b60c0820160008201516128df600085018261289c565b5060208201516128f260208501826128ab565b50604082015161290560408501826128ab565b50606082015161291860608501826128ba565b50608082015161292b608085018261289c565b5060a082015161293e60a085018261289c565b50505050565b600060c08201905061295960008301846128c9565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126129845761298361295f565b5b8235905067ffffffffffffffff8111156129a1576129a0612964565b5b6020830191508360208202830111156129bd576129bc612969565b5b9250929050565b600080602083850312156129db576129da61262f565b5b600083013567ffffffffffffffff8111156129f9576129f8612634565b5b612a058582860161296e565b92509250509250929050565b6000612a1c82612742565b9050919050565b612a2c81612a11565b82525050565b6000602082019050612a476000830184612a23565b92915050565b612a5681612685565b82525050565b6000602082019050612a716000830184612a4d565b92915050565b6000819050919050565b612a8a81612a77565b82525050565b6000604082019050612aa56000830185612605565b612ab26020830184612a81565b9392505050565b6000612ac482612685565b9050919050565b612ad481612ab9565b8114612adf57600080fd5b50565b600081359050612af181612acb565b92915050565b612b00816127bd565b8114612b0b57600080fd5b50565b600081359050612b1d81612af7565b92915050565b612b2c816127e0565b8114612b3757600080fd5b50565b600081359050612b4981612b23565b92915050565b60008060008060808587031215612b6957612b6861262f565b5b6000612b7787828801612650565b9450506020612b8887828801612ae2565b9350506040612b9987828801612b0e565b9250506060612baa87828801612b3a565b91505092959194509250565b600060208284031215612bcc57612bcb61262f565b5b6000612bda848285016126ae565b91505092915050565b600082825260208201905092915050565b7f4c69717569646974794d696e696e673a204f4e4c595f554e4c4f434b45440000600082015250565b6000612c2a601e83612be3565b9150612c3582612bf4565b602082019050919050565b60006020820190508181036000830152612c5981612c1d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612cf8826125fb565b9150612d03836125fb565b925082612d1357612d12612c8f565b5b828204905092915050565b7f4c4d3a20506f6f6c206861732065787069726564000000000000000000000000600082015250565b6000612d54601483612be3565b9150612d5f82612d1e565b602082019050919050565b60006020820190508181036000830152612d8381612d47565b9050919050565b6000612d95826125fb565b9150612da0836125fb565b925082821015612db357612db2612cbe565b5b828203905092915050565b6000604082019050612dd36000830185612a4d565b612de06020830184612605565b9392505050565b600081519050612df681612b23565b92915050565b600060208284031215612e1257612e1161262f565b5b6000612e2084828501612de7565b91505092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612e5f602083612be3565b9150612e6a82612e29565b602082019050919050565b60006020820190508181036000830152612e8e81612e52565b9050919050565b7f4c4d3a20506f6f6c7320617265206e6f74206578706972656400000000000000600082015250565b6000612ecb601983612be3565b9150612ed682612e95565b602082019050919050565b60006020820190508181036000830152612efa81612ebe565b9050919050565b600081519050612f1081612639565b92915050565b600060208284031215612f2c57612f2b61262f565b5b6000612f3a84828501612f01565b91505092915050565b6000606082019050612f5860008301866127d1565b612f656020830185612605565b612f726040830184612605565b949350505050565b6000612f85826125fb565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612fb857612fb7612cbe565b5b600182019050919050565b6000612fce826125fb565b9150612fd9836125fb565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561300e5761300d612cbe565b5b828201905092915050565b7f4c4d3a20496e73756666696369656e742066756e647300000000000000000000600082015250565b600061304f601683612be3565b915061305a82613019565b602082019050919050565b6000602082019050818103600083015261307e81613042565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006130e1602683612be3565b91506130ec82613085565b604082019050919050565b60006020820190508181036000830152613110816130d4565b9050919050565b6000613122826125fb565b915061312d836125fb565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561316657613165612cbe565b5b828202905092915050565b600061317c82612a77565b915061318783612a77565b9250827f8000000000000000000000000000000000000000000000000000000000000000018212600084121516156131c2576131c1612cbe565b5b827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0182136000841216156131fa576131f9612cbe565b5b828203905092915050565b7f5369676e6564536166654d6174683a207375627472616374696f6e206f76657260008201527f666c6f7700000000000000000000000000000000000000000000000000000000602082015250565b6000613261602483612be3565b915061326c82613205565b604082019050919050565b6000602082019050818103600083015261329081613254565b9050919050565b7f496e7465676572203c2030000000000000000000000000000000000000000000600082015250565b60006132cd600b83612be3565b91506132d882613297565b602082019050919050565b600060208201905081810360008301526132fc816132c0565b9050919050565b600061330e82612a77565b915061331983612a77565b9250817f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0383136000831215161561335457613353612cbe565b5b817f800000000000000000000000000000000000000000000000000000000000000003831260008312161561338c5761338b612cbe565b5b828201905092915050565b7f5369676e6564536166654d6174683a206164646974696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006133f3602183612be3565b91506133fe82613397565b604082019050919050565b60006020820190508181036000830152613422816133e6565b9050919050565b600060608201905061343e6000830186612a4d565b61344b6020830185612a4d565b6134586040830184612605565b949350505050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006134bc602a83612be3565b91506134c782613460565b604082019050919050565b600060208201905081810360008301526134eb816134af565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061354e602683612be3565b9150613559826134f2565b604082019050919050565b6000602082019050818103600083015261357d81613541565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006135ba601d83612be3565b91506135c582613584565b602082019050919050565b600060208201905081810360008301526135e9816135ad565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015613624578082015181840152602081019050613609565b83811115613633576000848401525b50505050565b6000613644826135f0565b61364e81856135fb565b935061365e818560208601613606565b80840191505092915050565b60006136768284613639565b915081905092915050565b600081519050919050565b6000601f19601f8301169050919050565b60006136a882613681565b6136b28185612be3565b93506136c2818560208601613606565b6136cb8161368c565b840191505092915050565b600060208201905081810360008301526136f0818461369d565b90509291505056fea2646970667358221220e46c31e92bc55ee82fef1acad1e4ae0190955d4a0e9e0e2d43e3f2d5fe21dfb564736f6c634300080900330000000000000000000000000edf9bc41bbc1354c70e2107f80c42cae7fbbca8
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101165760003560e01c806357a5b58c116100a25780638dbdbe6d116100715780638dbdbe6d146102be57806393f1a40b146102da578063b060976f1461030b578063d1abb90714610327578063f2fde38b1461034357610116565b806357a5b58c1461024a578063715018a61461026657806378ed5d1f146102705780638da5cb5b146102a057610116565b806318fccc76116100e957806318fccc76146101a85780632f940c70146101c457806332c764b9146101e05780634115671f146101ea57806351eb05a61461021a57610116565b8063081e3eda1461011b5780630ad58d2f146101395780631173fa47146101555780631526fe2714610173575b600080fd5b61012361035f565b6040516101309190612614565b60405180910390f35b610153600480360381019061014e91906126c3565b61036c565b005b61015d61059a565b60405161016a9190612775565b60405180910390f35b61018d60048036038101906101889190612790565b6105be565b60405161019f969594939291906127fb565b60405180910390f35b6101c260048036038101906101bd919061285c565b61063f565b005b6101de60048036038101906101d9919061285c565b6108c1565b005b6101e8610a9e565b005b61020460048036038101906101ff919061285c565b610cc0565b6040516102119190612614565b60405180910390f35b610234600480360381019061022f9190612790565b610f30565b6040516102419190612944565b60405180910390f35b610264600480360381019061025f91906129c4565b61123d565b005b61026e61128a565b005b61028a60048036038101906102859190612790565b611312565b6040516102979190612a32565b60405180910390f35b6102a8611351565b6040516102b59190612a5c565b60405180910390f35b6102d860048036038101906102d391906126c3565b61137a565b005b6102f460048036038101906102ef919061285c565b611559565b604051610302929190612a90565b60405180910390f35b61032560048036038101906103209190612b4f565b61158a565b005b610341600480360381019061033c91906126c3565b611929565b005b61035d60048036038101906103589190612bb6565b611d0b565b005b6000600280549050905090565b826000151561037a82611e03565b1515146103bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b390612c40565b60405180910390fd5b6103c584610f30565b5060006004600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600286815481106104305761042f612c60565b5b9060005260206000209060040201905061047d64e8d4a51000610460836000015488611eff90919063ffffffff16565b61046a9190612ced565b8360010154611f1590919063ffffffff16565b826001018190555061049c858360000154611f9690919063ffffffff16565b82600001819055506104bb858260030154611f9690919063ffffffff16565b816003018190555061052c8486600389815481106104dc576104db612c60565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611fac9092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff16863373ffffffffffffffffffffffffffffffffffffffff167f8166bf25f8a2b7ed3c85049207da4358d16edbed977d23fa2ee6f0dde3ec21328860405161058a9190612614565b60405180910390a4505050505050565b7f0000000000000000000000000edf9bc41bbc1354c70e2107f80c42cae7fbbca881565b600281815481106105ce57600080fd5b90600052602060002090600402016000915090508060000154908060010160009054906101000a900467ffffffffffffffff16908060010160089054906101000a900467ffffffffffffffff16908060010160109054906101000a900460ff16908060020154908060030154905086565b816000151561064d82611e03565b15151461068f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068690612c40565b60405180910390fd5b600061069a84610f30565b905060006004600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600015156106fc612032565b15151461073e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073590612d6a565b60405180910390fd5b600064e8d4a5100061076184600001518460000154611eff90919063ffffffff16565b61076b9190612ced565b9050600061078e610789846001015484611f1590919063ffffffff16565b612109565b9050818360010181905550600081146108695780600160008282546107b39190612d8a565b925050819055507f0000000000000000000000000edf9bc41bbc1354c70e2107f80c42cae7fbbca873ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87836040518363ffffffff1660e01b8152600401610815929190612dbe565b602060405180830381600087803b15801561082f57600080fd5b505af1158015610843573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108679190612dfc565b505b863373ffffffffffffffffffffffffffffffffffffffff167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954836040516108b09190612614565b60405180910390a350505050505050565b81600015156108cf82611e03565b151514610911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090890612c40565b60405180910390fd5b60006004600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060006002858154811061097b5761097a612c60565b5b9060005260206000209060040201905060008260000154905060008360000181905550600083600101819055506109bf818360030154611f9690919063ffffffff16565b8260030181905550610a308582600389815481106109e0576109df612c60565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611fac9092919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff16863373ffffffffffffffffffffffffffffffffffffffff167f2cac5e20e1541d836381527a43f651851e302817b71dc8e810284e69210c1c6b84604051610a8e9190612614565b60405180910390a4505050505050565b610aa6612156565b73ffffffffffffffffffffffffffffffffffffffff16610ac4611351565b73ffffffffffffffffffffffffffffffffffffffff1614610b1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1190612e75565b60405180910390fd5b60001515610b26612032565b151514610b68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5f90612ee1565b60405180910390fd5b7f0000000000000000000000000edf9bc41bbc1354c70e2107f80c42cae7fbbca873ffffffffffffffffffffffffffffffffffffffff1663a9059cbb337f0000000000000000000000000edf9bc41bbc1354c70e2107f80c42cae7fbbca873ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610bfe9190612a5c565b60206040518083038186803b158015610c1657600080fd5b505afa158015610c2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4e9190612f16565b6040518363ffffffff1660e01b8152600401610c6b929190612dbe565b602060405180830381600087803b158015610c8557600080fd5b505af1158015610c99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cbd9190612dfc565b50565b60008060028481548110610cd757610cd6612c60565b5b90600052602060002090600402016040518060c0016040529081600082015481526020016001820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160109054906101000a900460ff1615151515815260200160028201548152602001600382015481525050905060006004600086815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020604051806040016040529081600082015481526020016001820154815250509050600082600001519050826020015167ffffffffffffffff1643118015610e2d575060008360a0015114155b15610ee0576000836040015167ffffffffffffffff164311610e4f5743610e5f565b836040015167ffffffffffffffff165b90506000610e84856020015167ffffffffffffffff1683611f9690919063ffffffff16565b90506000610e9f866080015183611eff90919063ffffffff16565b9050610eda8660a00151610ec164e8d4a5100084611eff90919063ffffffff16565b610ecb9190612ced565b8561215e90919063ffffffff16565b93505050505b610f25610f20836020015164e8d4a51000610f08858760000151611eff90919063ffffffff16565b610f129190612ced565b611f1590919063ffffffff16565b612109565b935050505092915050565b610f386125af565b60028281548110610f4c57610f4b612c60565b5b90600052602060002090600402016040518060c0016040529081600082015481526020016001820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160109054906101000a900460ff16151515158152602001600282015481526020016003820154815250509050806020015167ffffffffffffffff164311801561103c5750806040015167ffffffffffffffff16816020015167ffffffffffffffff16105b15611238576000816040015167ffffffffffffffff16431161105e574361106e565b816040015167ffffffffffffffff165b905060008260a00151111561112c5760006110a0836020015167ffffffffffffffff1683611f9690919063ffffffff16565b905060006110bb846080015183611eff90919063ffffffff16565b905060008460a001516110dc64e8d4a5100084611eff90919063ffffffff16565b6110e69190612ced565b90506110ff81866000015161215e90919063ffffffff16565b85600001818152505083856020019067ffffffffffffffff16908167ffffffffffffffff16815250505050505b816002848154811061114157611140612c60565b5b90600052602060002090600402016000820151816000015560208201518160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060408201518160010160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060608201518160010160106101000a81548160ff0219169083151502179055506080820151816002015560a08201518160030155905050827f0fc9545022a542541ad085d091fb09a2ab36fee366a4576ab63714ea907ad35383602001518460a00151856000015160405161122e93929190612f43565b60405180910390a2505b919050565b600082829050905060005b818110156112845761127284848381811061126657611265612c60565b5b90506020020135610f30565b508061127d90612f7a565b9050611248565b50505050565b611292612156565b73ffffffffffffffffffffffffffffffffffffffff166112b0611351565b73ffffffffffffffffffffffffffffffffffffffff1614611306576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fd90612e75565b60405180910390fd5b6113106000612174565b565b6003818154811061132257600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61138383610f30565b5060006004600085815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600285815481106113ee576113ed612c60565b5b9060005260206000209060040201905061141584836000015461215e90919063ffffffff16565b826000018190555061145a64e8d4a5100061143d836000015487611eff90919063ffffffff16565b6114479190612ced565b836001015461223890919063ffffffff16565b826001018190555061147984826003015461215e90919063ffffffff16565b81600301819055506114ec3330866003898154811061149b5761149a612c60565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166122b9909392919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff16853373ffffffffffffffffffffffffffffffffffffffff167f02d7e648dd130fc184d383e55bb126ac4c9c60e8f94bf05acdf557ba2d540b478760405161154a9190612614565b60405180910390a45050505050565b6004602052816000526040600020602052806000526040600020600091509150508060000154908060010154905082565b611592612156565b73ffffffffffffffffffffffffffffffffffffffff166115b0611351565b73ffffffffffffffffffffffffffffffffffffffff1614611606576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fd90612e75565b60405180910390fd5b600061163785611629438667ffffffffffffffff16611f9690919063ffffffff16565b611eff90919063ffffffff16565b9050600154816116479190612fc3565b7f0000000000000000000000000edf9bc41bbc1354c70e2107f80c42cae7fbbca873ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016116a09190612a5c565b60206040518083038186803b1580156116b857600080fd5b505afa1580156116cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f09190612f16565b1015611731576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172890613065565b60405180910390fd5b80600160008282546117439190612fc3565b925050819055506003849080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060026040518060c00160405280600081526020014367ffffffffffffffff1681526020018567ffffffffffffffff1681526020018415158152602001878152602001600081525090806001815401808255809150506001900390600052602060002090600402016000909190919091506000820151816000015560208201518160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060408201518160010160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060608201518160010160106101000a81548160ff0219169083151502179055506080820151816002015560a0820151816003015550508373ffffffffffffffffffffffffffffffffffffffff166118eb6001600380549050611f9690919063ffffffff16565b7f4710feb78e3bce8d2e3ca2989a8eb2f8bcd32a6a55b4535942c180fc4d2e29528760405161191a9190612614565b60405180910390a35050505050565b826000151561193782611e03565b151514611979576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197090612c40565b60405180910390fd5b61198284610f30565b5060006004600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600286815481106119ed576119ec612c60565b5b9060005260206000209060040201905060001515611a09612032565b151514611a4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4290612d6a565b60405180910390fd5b600064e8d4a51000611a6e83600001548560000154611eff90919063ffffffff16565b611a789190612ced565b90506000611a9b611a96856001015484611f1590919063ffffffff16565b612109565b9050611ad664e8d4a51000611abd85600001548a611eff90919063ffffffff16565b611ac79190612ced565b83611f1590919063ffffffff16565b8460010181905550611af5878560000154611f9690919063ffffffff16565b8460000181905550611b14878460030154611f9690919063ffffffff16565b83600301819055508060016000828254611b2e9190612d8a565b925050819055507f0000000000000000000000000edf9bc41bbc1354c70e2107f80c42cae7fbbca873ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87836040518363ffffffff1660e01b8152600401611b90929190612dbe565b602060405180830381600087803b158015611baa57600080fd5b505af1158015611bbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be29190612dfc565b50611c4c868860038b81548110611bfc57611bfb612c60565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611fac9092919063ffffffff16565b8573ffffffffffffffffffffffffffffffffffffffff16883373ffffffffffffffffffffffffffffffffffffffff167f8166bf25f8a2b7ed3c85049207da4358d16edbed977d23fa2ee6f0dde3ec21328a604051611caa9190612614565b60405180910390a4873373ffffffffffffffffffffffffffffffffffffffff167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae066092495483604051611cf99190612614565b60405180910390a35050505050505050565b611d13612156565b73ffffffffffffffffffffffffffffffffffffffff16611d31611351565b73ffffffffffffffffffffffffffffffffffffffff1614611d87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7e90612e75565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611df7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dee906130f7565b60405180910390fd5b611e0081612174565b50565b60008060028381548110611e1a57611e19612c60565b5b90600052602060002090600402016040518060c0016040529081600082015481526020016001820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016001820160109054906101000a900460ff161515151581526020016002820154815260200160038201548152505090506001151581606001511515148015611ef7575043816040015167ffffffffffffffff16115b915050919050565b60008183611f0d9190613117565b905092915050565b6000808284611f249190613171565b905060008312158015611f375750838113155b80611f4d5750600083128015611f4c57508381135b5b611f8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f8390613277565b60405180910390fd5b8091505092915050565b60008183611fa49190612d8a565b905092915050565b61202d8363a9059cbb60e01b8484604051602401611fcb929190612dbe565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612342565b505050565b6000806000905060005b6002805490508110156120f157816002828154811061205e5761205d612c60565b5b906000526020600020906004020160010160089054906101000a900467ffffffffffffffff1667ffffffffffffffff161161209957816120de565b600281815481106120ad576120ac612c60565b5b906000526020600020906004020160010160089054906101000a900467ffffffffffffffff1667ffffffffffffffff165b9150806120ea90612f7a565b905061203c565b50620c3500816121019190612fc3565b431191505090565b60008082121561214e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612145906132e3565b60405180910390fd5b819050919050565b600033905090565b6000818361216c9190612fc3565b905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008082846122479190613303565b90506000831215801561225a5750838112155b80612270575060008312801561226f57508381125b5b6122af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122a690613409565b60405180910390fd5b8091505092915050565b61233c846323b872dd60e01b8585856040516024016122da93929190613429565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612342565b50505050565b60006123a4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166124099092919063ffffffff16565b905060008151111561240457808060200190518101906123c49190612dfc565b612403576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123fa906134d2565b60405180910390fd5b5b505050565b60606124188484600085612421565b90509392505050565b606082471015612466576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245d90613564565b60405180910390fd5b61246f85612535565b6124ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124a5906135d0565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516124d7919061366a565b60006040518083038185875af1925050503d8060008114612514576040519150601f19603f3d011682016040523d82523d6000602084013e612519565b606091505b5091509150612529828286612548565b92505050949350505050565b600080823b905060008111915050919050565b60608315612558578290506125a8565b60008351111561256b5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161259f91906136d6565b60405180910390fd5b9392505050565b6040518060c0016040528060008152602001600067ffffffffffffffff168152602001600067ffffffffffffffff16815260200160001515815260200160008152602001600081525090565b6000819050919050565b61260e816125fb565b82525050565b60006020820190506126296000830184612605565b92915050565b600080fd5b600080fd5b612642816125fb565b811461264d57600080fd5b50565b60008135905061265f81612639565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061269082612665565b9050919050565b6126a081612685565b81146126ab57600080fd5b50565b6000813590506126bd81612697565b92915050565b6000806000606084860312156126dc576126db61262f565b5b60006126ea86828701612650565b93505060206126fb86828701612650565b925050604061270c868287016126ae565b9150509250925092565b6000819050919050565b600061273b61273661273184612665565b612716565b612665565b9050919050565b600061274d82612720565b9050919050565b600061275f82612742565b9050919050565b61276f81612754565b82525050565b600060208201905061278a6000830184612766565b92915050565b6000602082840312156127a6576127a561262f565b5b60006127b484828501612650565b91505092915050565b600067ffffffffffffffff82169050919050565b6127da816127bd565b82525050565b60008115159050919050565b6127f5816127e0565b82525050565b600060c0820190506128106000830189612605565b61281d60208301886127d1565b61282a60408301876127d1565b61283760608301866127ec565b6128446080830185612605565b61285160a0830184612605565b979650505050505050565b600080604083850312156128735761287261262f565b5b600061288185828601612650565b9250506020612892858286016126ae565b9150509250929050565b6128a5816125fb565b82525050565b6128b4816127bd565b82525050565b6128c3816127e0565b82525050565b60c0820160008201516128df600085018261289c565b5060208201516128f260208501826128ab565b50604082015161290560408501826128ab565b50606082015161291860608501826128ba565b50608082015161292b608085018261289c565b5060a082015161293e60a085018261289c565b50505050565b600060c08201905061295960008301846128c9565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126129845761298361295f565b5b8235905067ffffffffffffffff8111156129a1576129a0612964565b5b6020830191508360208202830111156129bd576129bc612969565b5b9250929050565b600080602083850312156129db576129da61262f565b5b600083013567ffffffffffffffff8111156129f9576129f8612634565b5b612a058582860161296e565b92509250509250929050565b6000612a1c82612742565b9050919050565b612a2c81612a11565b82525050565b6000602082019050612a476000830184612a23565b92915050565b612a5681612685565b82525050565b6000602082019050612a716000830184612a4d565b92915050565b6000819050919050565b612a8a81612a77565b82525050565b6000604082019050612aa56000830185612605565b612ab26020830184612a81565b9392505050565b6000612ac482612685565b9050919050565b612ad481612ab9565b8114612adf57600080fd5b50565b600081359050612af181612acb565b92915050565b612b00816127bd565b8114612b0b57600080fd5b50565b600081359050612b1d81612af7565b92915050565b612b2c816127e0565b8114612b3757600080fd5b50565b600081359050612b4981612b23565b92915050565b60008060008060808587031215612b6957612b6861262f565b5b6000612b7787828801612650565b9450506020612b8887828801612ae2565b9350506040612b9987828801612b0e565b9250506060612baa87828801612b3a565b91505092959194509250565b600060208284031215612bcc57612bcb61262f565b5b6000612bda848285016126ae565b91505092915050565b600082825260208201905092915050565b7f4c69717569646974794d696e696e673a204f4e4c595f554e4c4f434b45440000600082015250565b6000612c2a601e83612be3565b9150612c3582612bf4565b602082019050919050565b60006020820190508181036000830152612c5981612c1d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612cf8826125fb565b9150612d03836125fb565b925082612d1357612d12612c8f565b5b828204905092915050565b7f4c4d3a20506f6f6c206861732065787069726564000000000000000000000000600082015250565b6000612d54601483612be3565b9150612d5f82612d1e565b602082019050919050565b60006020820190508181036000830152612d8381612d47565b9050919050565b6000612d95826125fb565b9150612da0836125fb565b925082821015612db357612db2612cbe565b5b828203905092915050565b6000604082019050612dd36000830185612a4d565b612de06020830184612605565b9392505050565b600081519050612df681612b23565b92915050565b600060208284031215612e1257612e1161262f565b5b6000612e2084828501612de7565b91505092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612e5f602083612be3565b9150612e6a82612e29565b602082019050919050565b60006020820190508181036000830152612e8e81612e52565b9050919050565b7f4c4d3a20506f6f6c7320617265206e6f74206578706972656400000000000000600082015250565b6000612ecb601983612be3565b9150612ed682612e95565b602082019050919050565b60006020820190508181036000830152612efa81612ebe565b9050919050565b600081519050612f1081612639565b92915050565b600060208284031215612f2c57612f2b61262f565b5b6000612f3a84828501612f01565b91505092915050565b6000606082019050612f5860008301866127d1565b612f656020830185612605565b612f726040830184612605565b949350505050565b6000612f85826125fb565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612fb857612fb7612cbe565b5b600182019050919050565b6000612fce826125fb565b9150612fd9836125fb565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561300e5761300d612cbe565b5b828201905092915050565b7f4c4d3a20496e73756666696369656e742066756e647300000000000000000000600082015250565b600061304f601683612be3565b915061305a82613019565b602082019050919050565b6000602082019050818103600083015261307e81613042565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006130e1602683612be3565b91506130ec82613085565b604082019050919050565b60006020820190508181036000830152613110816130d4565b9050919050565b6000613122826125fb565b915061312d836125fb565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561316657613165612cbe565b5b828202905092915050565b600061317c82612a77565b915061318783612a77565b9250827f8000000000000000000000000000000000000000000000000000000000000000018212600084121516156131c2576131c1612cbe565b5b827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0182136000841216156131fa576131f9612cbe565b5b828203905092915050565b7f5369676e6564536166654d6174683a207375627472616374696f6e206f76657260008201527f666c6f7700000000000000000000000000000000000000000000000000000000602082015250565b6000613261602483612be3565b915061326c82613205565b604082019050919050565b6000602082019050818103600083015261329081613254565b9050919050565b7f496e7465676572203c2030000000000000000000000000000000000000000000600082015250565b60006132cd600b83612be3565b91506132d882613297565b602082019050919050565b600060208201905081810360008301526132fc816132c0565b9050919050565b600061330e82612a77565b915061331983612a77565b9250817f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0383136000831215161561335457613353612cbe565b5b817f800000000000000000000000000000000000000000000000000000000000000003831260008312161561338c5761338b612cbe565b5b828201905092915050565b7f5369676e6564536166654d6174683a206164646974696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006133f3602183612be3565b91506133fe82613397565b604082019050919050565b60006020820190508181036000830152613422816133e6565b9050919050565b600060608201905061343e6000830186612a4d565b61344b6020830185612a4d565b6134586040830184612605565b949350505050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006134bc602a83612be3565b91506134c782613460565b604082019050919050565b600060208201905081810360008301526134eb816134af565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061354e602683612be3565b9150613559826134f2565b604082019050919050565b6000602082019050818103600083015261357d81613541565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006135ba601d83612be3565b91506135c582613584565b602082019050919050565b600060208201905081810360008301526135e9816135ad565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015613624578082015181840152602081019050613609565b83811115613633576000848401525b50505050565b6000613644826135f0565b61364e81856135fb565b935061365e818560208601613606565b80840191505092915050565b60006136768284613639565b915081905092915050565b600081519050919050565b6000601f19601f8301169050919050565b60006136a882613681565b6136b28185612be3565b93506136c2818560208601613606565b6136cb8161368c565b840191505092915050565b600060208201905081810360008301526136f0818461369d565b90509291505056fea2646970667358221220e46c31e92bc55ee82fef1acad1e4ae0190955d4a0e9e0e2d43e3f2d5fe21dfb564736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000edf9bc41bbc1354c70e2107f80c42cae7fbbca8
-----Decoded View---------------
Arg [0] : _instrumental (address): 0x0eDF9bc41Bbc1354c70e2107F80C42caE7FBBcA8
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000edf9bc41bbc1354c70e2107f80c42cae7fbbca8
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.