More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,068 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Unstake Exact St... | 21324386 | 70 days ago | IN | 0 ETH | 0.00187058 | ||||
Unstake Exact St... | 20421139 | 196 days ago | IN | 0 ETH | 0.00076174 | ||||
Unstake Exact St... | 19655700 | 303 days ago | IN | 0 ETH | 0.00083364 | ||||
Unstake Exact St... | 19460401 | 331 days ago | IN | 0 ETH | 0.00148148 | ||||
Unstake Exact St... | 19460389 | 331 days ago | IN | 0 ETH | 0.00179263 | ||||
Unstake Exact St... | 19225184 | 364 days ago | IN | 0 ETH | 0.00207384 | ||||
Unstake Exact St... | 19130931 | 377 days ago | IN | 0 ETH | 0.00130265 | ||||
Unstake Exact St... | 18870927 | 413 days ago | IN | 0 ETH | 0.00233385 | ||||
Unstake Exact St... | 18731495 | 433 days ago | IN | 0 ETH | 0.0019221 | ||||
Unstake Exact St... | 18705589 | 436 days ago | IN | 0 ETH | 0.00174935 | ||||
Unstake Exact St... | 18705550 | 436 days ago | IN | 0 ETH | 0.00169463 | ||||
Unstake Exact St... | 18705542 | 436 days ago | IN | 0 ETH | 0.0017299 | ||||
Unstake Exact St... | 18327580 | 489 days ago | IN | 0 ETH | 0.00053763 | ||||
Unstake Exact St... | 17407314 | 618 days ago | IN | 0 ETH | 0.00150858 | ||||
Unstake Exact St... | 17151001 | 654 days ago | IN | 0 ETH | 0.00189924 | ||||
Unstake Exact St... | 17150782 | 655 days ago | IN | 0 ETH | 0.00206127 | ||||
Unstake Exact St... | 17030631 | 672 days ago | IN | 0 ETH | 0.00164591 | ||||
Unstake Exact St... | 16944165 | 684 days ago | IN | 0 ETH | 0.00213325 | ||||
Unstake Exact St... | 16721317 | 715 days ago | IN | 0 ETH | 0.00172445 | ||||
Unstake Exact St... | 16721313 | 715 days ago | IN | 0 ETH | 0.00186491 | ||||
Unstake Exact St... | 16576982 | 735 days ago | IN | 0 ETH | 0.0017741 | ||||
Unstake Exact St... | 16547141 | 740 days ago | IN | 0 ETH | 0.00119382 | ||||
Unstake Exact St... | 16521333 | 743 days ago | IN | 0 ETH | 0.0016867 | ||||
Unstake Exact St... | 16521329 | 743 days ago | IN | 0 ETH | 0.001822 | ||||
Unstake Exact St... | 16404214 | 759 days ago | IN | 0 ETH | 0.00131294 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
||||
---|---|---|---|---|---|---|---|
21324386 | 70 days ago | 0 ETH | |||||
20421139 | 196 days ago | 0 ETH | |||||
19655700 | 303 days ago | 0 ETH | |||||
19460401 | 331 days ago | 0 ETH | |||||
19460389 | 331 days ago | 0 ETH | |||||
19225184 | 364 days ago | 0 ETH | |||||
19130931 | 377 days ago | 0 ETH | |||||
18870927 | 413 days ago | 0 ETH | |||||
18731495 | 433 days ago | 0 ETH | |||||
18705589 | 436 days ago | 0 ETH | |||||
18705550 | 436 days ago | 0 ETH | |||||
18705542 | 436 days ago | 0 ETH | |||||
18327580 | 489 days ago | 0 ETH | |||||
17407314 | 618 days ago | 0 ETH | |||||
17151001 | 654 days ago | 0 ETH | |||||
17150782 | 655 days ago | 0 ETH | |||||
17030631 | 672 days ago | 0 ETH | |||||
16944165 | 684 days ago | 0 ETH | |||||
16721317 | 715 days ago | 0 ETH | |||||
16721313 | 715 days ago | 0 ETH | |||||
16576982 | 735 days ago | 0 ETH | |||||
16547141 | 740 days ago | 0 ETH | |||||
16521333 | 743 days ago | 0 ETH | |||||
16521329 | 743 days ago | 0 ETH | |||||
16404214 | 759 days ago | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
A2Staking
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 100000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Context.sol"; contract A2Staking is Context, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; event PoolAdded(uint256 indexed poolId, address indexed token, uint256 cliff, uint256 duration, uint256 penalty); event PoolClosed(uint256 indexed poolId); event Staked(address indexed token, uint256 indexed pool, address indexed beneficiary, uint256 stake, uint256 stakeAmount, uint256 duration); event Unstaked(address indexed token, uint256 indexed pool, address indexed beneficiary, uint256 stake, uint256 unstakeAmount, uint256 penalty); uint256 private constant EXP = 1e18; struct Pool { IERC20 token; // Token of the pool uint256 cliff; // Period when unstake is prohibited uint256 duration; // Stake duration (including cliff) uint256 penalty; // Penalty of early unstake calculated as amount * penalty / EXP bool closed; // Closed pool is no longer available for new stakes, only unstake allowed uint256 tvl; // Total amount of tokens locked in this pool } struct Stake { uint256 start; uint256 amount; } Pool[] public pools; mapping(address => mapping(uint256 => Stake[])) public stakes; address public penaltyBeneficiary; constructor() { penaltyBeneficiary = owner(); } function addPool(IERC20 token, uint256 cliff, uint256 duration, uint256 penalty) external onlyOwner returns(uint256) { require(penalty < EXP, "penalty >= 100%"); require(duration >= cliff, "wrong duration"); uint256 poolId = pools.length; pools.push(Pool({ token: token, cliff: cliff, duration: duration, penalty:penalty, closed:false, tvl: 0 })); emit PoolAdded(poolId, address(token), cliff, duration, penalty); return poolId; } function closePool(uint256 poolId) external onlyOwner { Pool storage pool = pools[poolId]; require(address(pool.token) != address(0), "pool not found"); require(!pool.closed, "already closed"); pool.closed = true; emit PoolClosed(poolId); } function setPenaltyBeneficiary(address _penaltyBeneficiary) external onlyOwner { penaltyBeneficiary = _penaltyBeneficiary; } function stake(uint256 poolId, uint256 amount) external { stakeInternal(_msgSender(), poolId, amount); } function stakeFor(address beneficiary, uint256 poolId, uint256 amount) external { stakeInternal(beneficiary, poolId, amount); } /** * @notice Unstake from specific stake * @param poolId Pool to unstake from * @param stakeId Stake to unstake from * @param amount Amount to unstake */ function unstakeExactStake(uint256 poolId, uint256 stakeId, uint256 amount) external { unstakeExactStakeInternal(_msgSender(), poolId, stakeId, amount); } /** * @notice Unstake from specific stakes * @param poolId Pool to unstake from * @param stakeIds Array of stake ids to use for unstake, must be sorted in ascending order * @param amounts Array of amounts corresponding to stake ids */ function unstakeExactStakes(uint256 poolId, uint256[] calldata stakeIds, uint256[] calldata amounts) external { require(stakeIds.length == amounts.length, "arrays length mismatch"); unstakeExactStakesInternal(_msgSender(), poolId, stakeIds, amounts); } function userStakesAndPenalties(address beneficiary, uint256 poolId) external view returns(uint256[] memory stakeStarts, uint256[] memory stakeAmounts, uint256[] memory penalties) { Pool storage pool = pools[poolId]; require(address(pool.token) != address(0), "pool not found"); Stake[] storage userStakes = stakes[beneficiary][poolId]; stakeStarts = new uint256[](userStakes.length); stakeAmounts = new uint256[](userStakes.length); penalties = new uint256[](userStakes.length); for(uint256 i=0; i<userStakes.length; i++) { Stake storage stakee = userStakes[i]; stakeStarts[i] = stakee.start; stakeAmounts[i] = stakee.amount; uint256 penaltieForFullUnstake = calculateUnstakePenalty(pool, stakee, stakee.amount); if (penaltieForFullUnstake == 0) { penalties[i] = 0; } else if(penaltieForFullUnstake == stakee.amount) { penalties[i] = EXP; } else { penalties[i] = penaltieForFullUnstake.mul(EXP).div(stakee.amount); } } } function allUserStakesAndPenalties(address beneficiary) external view returns(uint256[] memory stakePools, uint256[] memory stakeIds, uint256[] memory stakeStarts, uint256[] memory stakeAmounts, uint256[] memory penalties) { uint256 totalStakes; for(uint256 p=0; p<pools.length; p++){ totalStakes += stakes[beneficiary][p].length; } stakePools = new uint256[](totalStakes); stakeIds = new uint256[](totalStakes); stakeStarts = new uint256[](totalStakes); stakeAmounts = new uint256[](totalStakes); penalties = new uint256[](totalStakes); uint256 idx; for(uint256 p=0; p<pools.length; p++){ Stake[] storage userStakes = stakes[beneficiary][p]; if(userStakes.length == 0) continue; Pool storage pool = pools[p]; for(uint256 i=0; i<userStakes.length; i++) { Stake storage stakee = userStakes[i]; stakePools[idx] = p; stakeIds[idx] = i; stakeStarts[idx] = stakee.start; stakeAmounts[idx] = stakee.amount; uint256 penaltieForFullUnstake = calculateUnstakePenalty(pool, stakee, stakee.amount); if (penaltieForFullUnstake == 0) { penalties[idx] = 0; } else if(penaltieForFullUnstake == stakee.amount) { penalties[idx] = EXP; } else { penalties[idx] = penaltieForFullUnstake.mul(EXP).div(stakee.amount); } idx++; } } } function stakeInternal(address beneficiary, uint256 poolId, uint256 amount) internal { Pool storage pool = pools[poolId]; require(address(pool.token) != address(0), "pool not found"); require(!pool.closed, "pool closed"); pool.token.safeTransferFrom(_msgSender(), address(this), amount); Stake[] storage userStakes = stakes[beneficiary][poolId]; uint256 stakeId = userStakes.length; userStakes.push(Stake({ start: block.timestamp, amount: amount })); pool.tvl = pool.tvl.add(amount); emit Staked(address(pool.token), poolId, beneficiary, stakeId, amount, pool.duration); } function unstakeExactStakeInternal(address beneficiary, uint256 poolId, uint256 stakeId, uint256 unstakeAmount) internal { Pool storage pool = pools[poolId]; require(address(pool.token) != address(0), "pool not found"); Stake[] storage userStakes = stakes[beneficiary][poolId]; require(userStakes.length > 0, "no stakes"); require(stakeId < userStakes.length, "wrong stake id"); Stake storage stakee = userStakes[stakeId]; (uint256 userAmount, uint256 penaltyAmount) = prepareUnstakeExactStake(pool, stakee, unstakeAmount); stakee.amount = stakee.amount.sub(unstakeAmount); emit Unstaked(address(pool.token), poolId, beneficiary, stakeId, unstakeAmount, penaltyAmount); pool.tvl = pool.tvl.sub(unstakeAmount); pool.token.safeTransfer(beneficiary, userAmount); if(penaltyAmount > 0) { pool.token.safeTransfer(penaltyBeneficiary, penaltyAmount); } } function unstakeExactStakesInternal(address beneficiary, uint256 poolId, uint256[] memory stakeIds, uint256[] memory amounts) internal { Pool storage pool = pools[poolId]; require(address(pool.token) != address(0), "pool not found"); Stake[] storage userStakes = stakes[beneficiary][poolId]; require(userStakes.length > 0, "no stakes"); //require(stakeIds.length == amounts.length, "arrays length mismatch"); //Here we assume its already checked uint256 prevStakeId; uint256 totalUserAmount; uint256 totalPenaltyAmount; for (uint256 i=0; i<stakeIds.length; i++) { uint256 stakeId = stakeIds[i]; require(i==0 || prevStakeId < stakeId, "unsorted stake ids"); // Prevent unstaking from same stake twice require(stakeId < userStakes.length, "wrong stake id"); prevStakeId = stakeId; Stake storage stakee = userStakes[stakeId]; (uint256 userAmount, uint256 penaltyAmount) = prepareUnstakeExactStake(pool, stakee, amounts[i]); stakee.amount = stakee.amount.sub(amounts[i]); emit Unstaked(address(pool.token), poolId, beneficiary, stakeIds[i], amounts[i], penaltyAmount); totalUserAmount = totalUserAmount.add(userAmount); totalPenaltyAmount = totalPenaltyAmount.add(penaltyAmount); } pool.tvl = pool.tvl.sub(totalUserAmount).sub(totalPenaltyAmount); pool.token.safeTransfer(beneficiary, totalUserAmount); if(totalPenaltyAmount > 0) { pool.token.safeTransfer(penaltyBeneficiary, totalPenaltyAmount); } } function prepareUnstakeExactStake(Pool storage pool, Stake storage stakee, uint256 amount) internal view returns(uint256 userAmount, uint256 penaltyAmount) { require(stakee.start > 0, "incorrect stake"); // should never happen, but just to be sure... require(amount > 0, "wrong amount"); require(amount <= stakee.amount, "high amount"); penaltyAmount = calculateUnstakePenalty(pool, stakee, amount); require(penaltyAmount < amount, "unstake not available yet"); userAmount = amount - penaltyAmount; return (userAmount, penaltyAmount); } /** * @notice Calculates penalty amount * @dev if penalty == unstakeAmount, that indicates that unstake is forbidden * @param pool Pool of the stake * @param stakee Stake to unstake from * @param unstakeAmount Amount to unstake * @return penalty amount */ function calculateUnstakePenalty(Pool storage pool, Stake storage stakee, uint256 unstakeAmount) internal view returns(uint256) { uint256 timePassed = block.timestamp.sub(stakee.start); if(timePassed >= pool.duration) return 0; if(timePassed < pool.cliff) return unstakeAmount; //unstake is prohibited uint256 penaltyTimeLeft = pool.duration.sub(timePassed); uint256 linearVestingDuration = pool.duration.sub(pool.cliff); // penaltyTimePeriod != 0 because if pool.duration == pool.cliff, then one of conditions above will be true return unstakeAmount.mul(pool.penalty).mul(penaltyTimeLeft).div(linearVestingDuration).div(EXP); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.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 () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ 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) { 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) { 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) { // 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) { 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) { 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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); 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) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @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. 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) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); 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) { require(b > 0, "SafeMath: modulo by zero"); 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) { 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. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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) { 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) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.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 pragma solidity ^0.7.0; import "./IERC20.sol"; import "../../math/SafeMath.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 SafeMath for uint256; 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' // solhint-disable-next-line max-line-length 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).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _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 // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.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; // solhint-disable-next-line no-inline-assembly 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 100000 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":"uint256","name":"poolId","type":"uint256"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"cliff","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"penalty","type":"uint256"}],"name":"PoolAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"PoolClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"pool","type":"uint256"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"stake","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"pool","type":"uint256"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"stake","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unstakeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"penalty","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"cliff","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"penalty","type":"uint256"}],"name":"addPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"}],"name":"allUserStakesAndPenalties","outputs":[{"internalType":"uint256[]","name":"stakePools","type":"uint256[]"},{"internalType":"uint256[]","name":"stakeIds","type":"uint256[]"},{"internalType":"uint256[]","name":"stakeStarts","type":"uint256[]"},{"internalType":"uint256[]","name":"stakeAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"penalties","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"closePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"penaltyBeneficiary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pools","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"cliff","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"penalty","type":"uint256"},{"internalType":"bool","name":"closed","type":"bool"},{"internalType":"uint256","name":"tvl","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_penaltyBeneficiary","type":"address"}],"name":"setPenaltyBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakes","outputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"stakeId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstakeExactStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256[]","name":"stakeIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"unstakeExactStakes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"userStakesAndPenalties","outputs":[{"internalType":"uint256[]","name":"stakeStarts","type":"uint256[]"},{"internalType":"uint256[]","name":"stakeAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"penalties","type":"uint256[]"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060006200001e62000098565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620000726200009c565b600380546001600160a01b0319166001600160a01b0392909216919091179055620000ab565b3390565b6000546001600160a01b031690565b612ace80620000bb6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80637b0472f011610097578063ce24788c11610066578063ce24788c14610485578063dd63152c146104b8578063f2fde38b14610653578063f52b619a14610686576100f5565b80637b0472f0146103285780638da5cb5b1461034b578063ac4afa3814610353578063c2b23637146103bc576100f5565b806351d25d5d116100d357806351d25d5d1461017357806358e9a8151461028a5780635a4ec0ca146102c9578063715018a614610320576100f5565b80630913dd70146100fa57806321a6a29c1461012b57806337de615f14610156575b600080fd5b6101026106de565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101546004803603606081101561014157600080fd5b50803590602081013590604001356106fa565b005b6101546004803603602081101561016c57600080fd5b5035610712565b6101ac6004803603604081101561018957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561092f565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b838110156101f45781810151838201526020016101dc565b50505050905001848103835286818151815260200191508051906020019060200280838360005b8381101561023357818101518382015260200161021b565b50505050905001848103825285818151815260200191508051906020019060200280838360005b8381101561027257818101518382015260200161025a565b50505050905001965050505050505060405180910390f35b610154600480360360608110156102a057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060400135610be4565b61030e600480360360808110156102df57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060600135610bef565b60408051918252519081900360200190f35b610154610f68565b6101546004803603604081101561033e57600080fd5b508035906020013561107f565b610102611095565b6103706004803603602081101561036957600080fd5b50356110b1565b6040805173ffffffffffffffffffffffffffffffffffffffff909716875260208701959095528585019390935260608501919091521515608084015260a0830152519081900360c00190f35b610154600480360360608110156103d257600080fd5b813591908101906040810160208201356401000000008111156103f457600080fd5b82018360208201111561040657600080fd5b8035906020019184602083028401116401000000008311171561042857600080fd5b91939092909160208101903564010000000081111561044657600080fd5b82018360208201111561045857600080fd5b8035906020019184602083028401116401000000008311171561047a57600080fd5b509092509050611114565b6101546004803603602081101561049b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111ff565b6104eb600480360360208110156104ce57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166112ee565b60405180806020018060200180602001806020018060200186810386528b818151815260200191508051906020019060200280838360005b8381101561053b578181015183820152602001610523565b5050505090500186810385528a818151815260200191508051906020019060200280838360005b8381101561057a578181015183820152602001610562565b50505050905001868103845289818151815260200191508051906020019060200280838360005b838110156105b95781810151838201526020016105a1565b50505050905001868103835288818151815260200191508051906020019060200280838360005b838110156105f85781810151838201526020016105e0565b50505050905001868103825287818151815260200191508051906020019060200280838360005b8381101561063757818101518382015260200161061f565b505050509050019a505050505050505050505060405180910390f35b6101546004803603602081101561066957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611646565b6106c56004803603606081101561069c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602081013590604001356117e7565b6040805192835260208301919091528051918290030190f35b60035473ffffffffffffffffffffffffffffffffffffffff1681565b61070d610705611831565b848484611835565b505050565b61071a611831565b73ffffffffffffffffffffffffffffffffffffffff16610738611095565b73ffffffffffffffffffffffffffffffffffffffff16146107ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000600182815481106107c957fe5b60009182526020909120600690910201805490915073ffffffffffffffffffffffffffffffffffffffff1661085f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f706f6f6c206e6f7420666f756e64000000000000000000000000000000000000604482015290519081900360640190fd5b600481015460ff16156108d357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f616c726561647920636c6f736564000000000000000000000000000000000000604482015290519081900360640190fd5b6004810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905560405182907f925a19753e677c9dc36a80e0fc824ca0c5b1afde494872b43daccab9ffeaffd490600090a25050565b606080606060006001858154811061094357fe5b60009182526020909120600690910201805490915073ffffffffffffffffffffffffffffffffffffffff166109d957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f706f6f6c206e6f7420666f756e64000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff861660009081526002602090815260408083208884529091529020805467ffffffffffffffff81118015610a2157600080fd5b50604051908082528060200260200182016040528015610a4b578160200160208202803683370190505b50815490955067ffffffffffffffff81118015610a6757600080fd5b50604051908082528060200260200182016040528015610a91578160200160208202803683370190505b50815490945067ffffffffffffffff81118015610aad57600080fd5b50604051908082528060200260200182016040528015610ad7578160200160208202803683370190505b50925060005b8154811015610bda576000828281548110610af457fe5b906000526020600020906002020190508060000154878381518110610b1557fe5b6020026020010181815250508060010154868381518110610b3257fe5b6020026020010181815250506000610b4f85838460010154611afc565b905080610b75576000868481518110610b6457fe5b602002602001018181525050610bd0565b8160010154811415610b9657670de0b6b3a7640000868481518110610b6457fe5b6001820154610bb790610bb183670de0b6b3a7640000611bab565b90611c27565b868481518110610bc357fe5b6020026020010181815250505b5050600101610add565b5050509250925092565b61070d838383611ca8565b6000610bf9611831565b73ffffffffffffffffffffffffffffffffffffffff16610c17611095565b73ffffffffffffffffffffffffffffffffffffffff1614610c9957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b670de0b6b3a76400008210610d0f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f70656e616c7479203e3d20313030250000000000000000000000000000000000604482015290519081900360640190fd5b83831015610d7e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f77726f6e67206475726174696f6e000000000000000000000000000000000000604482015290519081900360640190fd5b600180546040805160c08101825273ffffffffffffffffffffffffffffffffffffffff89811680835260208084018b81528486018b815260608087018c815260006080890181815260a08a018281528c8e018e559c90915297517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf660068c0290810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016929099169190911790975592517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf787015590517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf886015590517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf985015593517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cfa840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905595517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cfb90920191909155825189815294850188905284830187905291519293919284927fdcad60f82308d160bd8a3814cf84788a2c98294718485b86d238d14cbf166dab92908290030190a395945050505050565b610f70611831565b73ffffffffffffffffffffffffffffffffffffffff16610f8e611095565b73ffffffffffffffffffffffffffffffffffffffff161461101057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b61109161108a611831565b8383611ca8565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600181815481106110c157600080fd5b600091825260209091206006909102018054600182015460028301546003840154600485015460059095015473ffffffffffffffffffffffffffffffffffffffff90941695509193909260ff9091169086565b82811461118257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f617272617973206c656e677468206d69736d6174636800000000000000000000604482015290519081900360640190fd5b6111f861118d611831565b8686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250611ed392505050565b5050505050565b611207611831565b73ffffffffffffffffffffffffffffffffffffffff16611225611095565b73ffffffffffffffffffffffffffffffffffffffff16146112a757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6060808080806000805b6001548110156113405773ffffffffffffffffffffffffffffffffffffffff8816600090815260026020908152604080832084845290915290205491909101906001016112f8565b508067ffffffffffffffff8111801561135857600080fd5b50604051908082528060200260200182016040528015611382578160200160208202803683370190505b5095508067ffffffffffffffff8111801561139c57600080fd5b506040519080825280602002602001820160405280156113c6578160200160208202803683370190505b5094508067ffffffffffffffff811180156113e057600080fd5b5060405190808252806020026020018201604052801561140a578160200160208202803683370190505b5093508067ffffffffffffffff8111801561142457600080fd5b5060405190808252806020026020018201604052801561144e578160200160208202803683370190505b5092508067ffffffffffffffff8111801561146857600080fd5b50604051908082528060200260200182016040528015611492578160200160208202803683370190505b5091506000805b60015481101561163a5773ffffffffffffffffffffffffffffffffffffffff89166000908152600260209081526040808320848452909152902080546114df5750611632565b6000600183815481106114ee57fe5b9060005260206000209060060201905060005b825481101561162e57600083828154811061151857fe5b90600052602060002090600202019050848c878151811061153557fe5b602002602001018181525050818b878151811061154e57fe5b60200260200101818152505080600001548a878151811061156b57fe5b602002602001018181525050806001015489878151811061158857fe5b60200260200101818152505060006115a584838460010154611afc565b9050806115cb5760008988815181106115ba57fe5b602002602001018181525050611620565b81600101548114156115ec57670de0b6b3a76400008988815181106115ba57fe5b600182015461160790610bb183670de0b6b3a7640000611bab565b89888151811061161357fe5b6020026020010181815250505b505060019485019401611501565b5050505b600101611499565b50505091939590929450565b61164e611831565b73ffffffffffffffffffffffffffffffffffffffff1661166c611095565b73ffffffffffffffffffffffffffffffffffffffff16146116ee57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811661175a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612a026026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6002602052826000526040600020602052816000526040600020818154811061180f57600080fd5b6000918252602090912060029091020180546001909101549093509150839050565b3390565b60006001848154811061184457fe5b60009182526020909120600690910201805490915073ffffffffffffffffffffffffffffffffffffffff166118da57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f706f6f6c206e6f7420666f756e64000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083208784529091529020805461197757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f207374616b65730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b805484106119e657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f77726f6e67207374616b65206964000000000000000000000000000000000000604482015290519081900360640190fd5b60008185815481106119f457fe5b90600052602060002090600202019050600080611a128584886122a1565b60018501549193509150611a269087612481565b600184015584546040805189815260208101899052808201849052905173ffffffffffffffffffffffffffffffffffffffff808d16938c939116917f0b598c0d1c4a0eff9fe8687a16f795524df83784a7cc2a7946718e49f7c47f9b9181900360600190a46005850154611a9a9087612481565b60058601558454611ac29073ffffffffffffffffffffffffffffffffffffffff168a846124f8565b8015611af1576003548554611af19173ffffffffffffffffffffffffffffffffffffffff9182169116836124f8565b505050505050505050565b81546000908190611b0e904290612481565b905084600201548110611b25576000915050611ba4565b8460010154811015611b3a5782915050611ba4565b6002850154600090611b4c9083612481565b90506000611b6b8760010154886002015461248190919063ffffffff16565b9050611b9e670de0b6b3a7640000610bb183610bb186611b988d600301548c611bab90919063ffffffff16565b90611bab565b93505050505b9392505050565b600082611bba57506000611c21565b82820282848281611bc757fe5b0414611c1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612a4e6021913960400191505060405180910390fd5b90505b92915050565b6000808211611c9757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611ca057fe5b049392505050565b600060018381548110611cb757fe5b60009182526020909120600690910201805490915073ffffffffffffffffffffffffffffffffffffffff16611d4d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f706f6f6c206e6f7420666f756e64000000000000000000000000000000000000604482015290519081900360640190fd5b600481015460ff1615611dc157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f706f6f6c20636c6f736564000000000000000000000000000000000000000000604482015290519081900360640190fd5b611dec611dcc611831565b825473ffffffffffffffffffffffffffffffffffffffff16903085612585565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260026020818152604080842087855282528084208054825180840190935242835282840188815260018083018455838852949096209251948102909201938455935192909101919091556005830154611e619085612620565b6005840155825460028401546040805184815260208101889052808201929092525173ffffffffffffffffffffffffffffffffffffffff808a169389939116917f76e324f068a8bf6d168b3249574fe4ad25b9f378d8645319674b654c58850b2e9181900360600190a4505050505050565b600060018481548110611ee257fe5b60009182526020909120600690910201805490915073ffffffffffffffffffffffffffffffffffffffff16611f7857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f706f6f6c206e6f7420666f756e64000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083208784529091529020805461201557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f207374616b65730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008080805b875181101561227f57600088828151811061203257fe5b60200260200101519050816000148061204a57508085105b6120b557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f756e736f72746564207374616b65206964730000000000000000000000000000604482015290519081900360640190fd5b8554811061212457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f77726f6e67207374616b65206964000000000000000000000000000000000000604482015290519081900360640190fd5b809450600086828154811061213557fe5b906000526020600020906002020190506000806121668a848d888151811061215957fe5b60200260200101516122a1565b915091506121948b868151811061217957fe5b6020026020010151846001015461248190919063ffffffff16565b83600101819055508d73ffffffffffffffffffffffffffffffffffffffff168d8b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f0b598c0d1c4a0eff9fe8687a16f795524df83784a7cc2a7946718e49f7c47f9b8f898151811061221c57fe5b60200260200101518f8a8151811061223057fe5b6020908102919091018101516040805193845291830152818101879052519081900360600190a46122618783612620565b965061226d8682612620565b9550506001909301925061201b915050565b50611a9a8161229b84886005015461248190919063ffffffff16565b90612481565b600080600084600001541161231757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f696e636f7272656374207374616b650000000000000000000000000000000000604482015290519081900360640190fd5b6000831161238657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f77726f6e6720616d6f756e740000000000000000000000000000000000000000604482015290519081900360640190fd5b83600101548311156123f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6869676820616d6f756e74000000000000000000000000000000000000000000604482015290519081900360640190fd5b612404858585611afc565b905082811061247457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f756e7374616b65206e6f7420617661696c61626c652079657400000000000000604482015290519081900360640190fd5b8083039150935093915050565b6000828211156124f257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261070d908490612694565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261261a908590612694565b50505050565b600082820183811015611c1e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006126f6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661276c9092919063ffffffff16565b80519091501561070d5780806020019051602081101561271557600080fd5b505161070d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612a6f602a913960400191505060405180910390fd5b606061277b8484600085612783565b949350505050565b6060824710156127de576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612a286026913960400191505060405180910390fd5b6127e78561293d565b61285257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106128bb57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161287e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461291d576040519150601f19603f3d011682016040523d82523d6000602084013e612922565b606091505b5091509150612932828286612943565b979650505050505050565b3b151590565b60608315612952575081611ba4565b8251156129625782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156129c65781810151838201526020016129ae565b50505050905090810190601f1680156129f35780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220ef40588a949dbda18dea8a0a3e0055ebc90033b75dae84f25ca2fcf22ea7a2a264736f6c63430007060033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80637b0472f011610097578063ce24788c11610066578063ce24788c14610485578063dd63152c146104b8578063f2fde38b14610653578063f52b619a14610686576100f5565b80637b0472f0146103285780638da5cb5b1461034b578063ac4afa3814610353578063c2b23637146103bc576100f5565b806351d25d5d116100d357806351d25d5d1461017357806358e9a8151461028a5780635a4ec0ca146102c9578063715018a614610320576100f5565b80630913dd70146100fa57806321a6a29c1461012b57806337de615f14610156575b600080fd5b6101026106de565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101546004803603606081101561014157600080fd5b50803590602081013590604001356106fa565b005b6101546004803603602081101561016c57600080fd5b5035610712565b6101ac6004803603604081101561018957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561092f565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b838110156101f45781810151838201526020016101dc565b50505050905001848103835286818151815260200191508051906020019060200280838360005b8381101561023357818101518382015260200161021b565b50505050905001848103825285818151815260200191508051906020019060200280838360005b8381101561027257818101518382015260200161025a565b50505050905001965050505050505060405180910390f35b610154600480360360608110156102a057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060400135610be4565b61030e600480360360808110156102df57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060408101359060600135610bef565b60408051918252519081900360200190f35b610154610f68565b6101546004803603604081101561033e57600080fd5b508035906020013561107f565b610102611095565b6103706004803603602081101561036957600080fd5b50356110b1565b6040805173ffffffffffffffffffffffffffffffffffffffff909716875260208701959095528585019390935260608501919091521515608084015260a0830152519081900360c00190f35b610154600480360360608110156103d257600080fd5b813591908101906040810160208201356401000000008111156103f457600080fd5b82018360208201111561040657600080fd5b8035906020019184602083028401116401000000008311171561042857600080fd5b91939092909160208101903564010000000081111561044657600080fd5b82018360208201111561045857600080fd5b8035906020019184602083028401116401000000008311171561047a57600080fd5b509092509050611114565b6101546004803603602081101561049b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111ff565b6104eb600480360360208110156104ce57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166112ee565b60405180806020018060200180602001806020018060200186810386528b818151815260200191508051906020019060200280838360005b8381101561053b578181015183820152602001610523565b5050505090500186810385528a818151815260200191508051906020019060200280838360005b8381101561057a578181015183820152602001610562565b50505050905001868103845289818151815260200191508051906020019060200280838360005b838110156105b95781810151838201526020016105a1565b50505050905001868103835288818151815260200191508051906020019060200280838360005b838110156105f85781810151838201526020016105e0565b50505050905001868103825287818151815260200191508051906020019060200280838360005b8381101561063757818101518382015260200161061f565b505050509050019a505050505050505050505060405180910390f35b6101546004803603602081101561066957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611646565b6106c56004803603606081101561069c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602081013590604001356117e7565b6040805192835260208301919091528051918290030190f35b60035473ffffffffffffffffffffffffffffffffffffffff1681565b61070d610705611831565b848484611835565b505050565b61071a611831565b73ffffffffffffffffffffffffffffffffffffffff16610738611095565b73ffffffffffffffffffffffffffffffffffffffff16146107ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000600182815481106107c957fe5b60009182526020909120600690910201805490915073ffffffffffffffffffffffffffffffffffffffff1661085f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f706f6f6c206e6f7420666f756e64000000000000000000000000000000000000604482015290519081900360640190fd5b600481015460ff16156108d357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f616c726561647920636c6f736564000000000000000000000000000000000000604482015290519081900360640190fd5b6004810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905560405182907f925a19753e677c9dc36a80e0fc824ca0c5b1afde494872b43daccab9ffeaffd490600090a25050565b606080606060006001858154811061094357fe5b60009182526020909120600690910201805490915073ffffffffffffffffffffffffffffffffffffffff166109d957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f706f6f6c206e6f7420666f756e64000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff861660009081526002602090815260408083208884529091529020805467ffffffffffffffff81118015610a2157600080fd5b50604051908082528060200260200182016040528015610a4b578160200160208202803683370190505b50815490955067ffffffffffffffff81118015610a6757600080fd5b50604051908082528060200260200182016040528015610a91578160200160208202803683370190505b50815490945067ffffffffffffffff81118015610aad57600080fd5b50604051908082528060200260200182016040528015610ad7578160200160208202803683370190505b50925060005b8154811015610bda576000828281548110610af457fe5b906000526020600020906002020190508060000154878381518110610b1557fe5b6020026020010181815250508060010154868381518110610b3257fe5b6020026020010181815250506000610b4f85838460010154611afc565b905080610b75576000868481518110610b6457fe5b602002602001018181525050610bd0565b8160010154811415610b9657670de0b6b3a7640000868481518110610b6457fe5b6001820154610bb790610bb183670de0b6b3a7640000611bab565b90611c27565b868481518110610bc357fe5b6020026020010181815250505b5050600101610add565b5050509250925092565b61070d838383611ca8565b6000610bf9611831565b73ffffffffffffffffffffffffffffffffffffffff16610c17611095565b73ffffffffffffffffffffffffffffffffffffffff1614610c9957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b670de0b6b3a76400008210610d0f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f70656e616c7479203e3d20313030250000000000000000000000000000000000604482015290519081900360640190fd5b83831015610d7e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f77726f6e67206475726174696f6e000000000000000000000000000000000000604482015290519081900360640190fd5b600180546040805160c08101825273ffffffffffffffffffffffffffffffffffffffff89811680835260208084018b81528486018b815260608087018c815260006080890181815260a08a018281528c8e018e559c90915297517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf660068c0290810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016929099169190911790975592517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf787015590517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf886015590517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf985015593517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cfa840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905595517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cfb90920191909155825189815294850188905284830187905291519293919284927fdcad60f82308d160bd8a3814cf84788a2c98294718485b86d238d14cbf166dab92908290030190a395945050505050565b610f70611831565b73ffffffffffffffffffffffffffffffffffffffff16610f8e611095565b73ffffffffffffffffffffffffffffffffffffffff161461101057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b61109161108a611831565b8383611ca8565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600181815481106110c157600080fd5b600091825260209091206006909102018054600182015460028301546003840154600485015460059095015473ffffffffffffffffffffffffffffffffffffffff90941695509193909260ff9091169086565b82811461118257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f617272617973206c656e677468206d69736d6174636800000000000000000000604482015290519081900360640190fd5b6111f861118d611831565b8686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250611ed392505050565b5050505050565b611207611831565b73ffffffffffffffffffffffffffffffffffffffff16611225611095565b73ffffffffffffffffffffffffffffffffffffffff16146112a757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6060808080806000805b6001548110156113405773ffffffffffffffffffffffffffffffffffffffff8816600090815260026020908152604080832084845290915290205491909101906001016112f8565b508067ffffffffffffffff8111801561135857600080fd5b50604051908082528060200260200182016040528015611382578160200160208202803683370190505b5095508067ffffffffffffffff8111801561139c57600080fd5b506040519080825280602002602001820160405280156113c6578160200160208202803683370190505b5094508067ffffffffffffffff811180156113e057600080fd5b5060405190808252806020026020018201604052801561140a578160200160208202803683370190505b5093508067ffffffffffffffff8111801561142457600080fd5b5060405190808252806020026020018201604052801561144e578160200160208202803683370190505b5092508067ffffffffffffffff8111801561146857600080fd5b50604051908082528060200260200182016040528015611492578160200160208202803683370190505b5091506000805b60015481101561163a5773ffffffffffffffffffffffffffffffffffffffff89166000908152600260209081526040808320848452909152902080546114df5750611632565b6000600183815481106114ee57fe5b9060005260206000209060060201905060005b825481101561162e57600083828154811061151857fe5b90600052602060002090600202019050848c878151811061153557fe5b602002602001018181525050818b878151811061154e57fe5b60200260200101818152505080600001548a878151811061156b57fe5b602002602001018181525050806001015489878151811061158857fe5b60200260200101818152505060006115a584838460010154611afc565b9050806115cb5760008988815181106115ba57fe5b602002602001018181525050611620565b81600101548114156115ec57670de0b6b3a76400008988815181106115ba57fe5b600182015461160790610bb183670de0b6b3a7640000611bab565b89888151811061161357fe5b6020026020010181815250505b505060019485019401611501565b5050505b600101611499565b50505091939590929450565b61164e611831565b73ffffffffffffffffffffffffffffffffffffffff1661166c611095565b73ffffffffffffffffffffffffffffffffffffffff16146116ee57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811661175a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612a026026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6002602052826000526040600020602052816000526040600020818154811061180f57600080fd5b6000918252602090912060029091020180546001909101549093509150839050565b3390565b60006001848154811061184457fe5b60009182526020909120600690910201805490915073ffffffffffffffffffffffffffffffffffffffff166118da57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f706f6f6c206e6f7420666f756e64000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083208784529091529020805461197757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f207374616b65730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b805484106119e657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f77726f6e67207374616b65206964000000000000000000000000000000000000604482015290519081900360640190fd5b60008185815481106119f457fe5b90600052602060002090600202019050600080611a128584886122a1565b60018501549193509150611a269087612481565b600184015584546040805189815260208101899052808201849052905173ffffffffffffffffffffffffffffffffffffffff808d16938c939116917f0b598c0d1c4a0eff9fe8687a16f795524df83784a7cc2a7946718e49f7c47f9b9181900360600190a46005850154611a9a9087612481565b60058601558454611ac29073ffffffffffffffffffffffffffffffffffffffff168a846124f8565b8015611af1576003548554611af19173ffffffffffffffffffffffffffffffffffffffff9182169116836124f8565b505050505050505050565b81546000908190611b0e904290612481565b905084600201548110611b25576000915050611ba4565b8460010154811015611b3a5782915050611ba4565b6002850154600090611b4c9083612481565b90506000611b6b8760010154886002015461248190919063ffffffff16565b9050611b9e670de0b6b3a7640000610bb183610bb186611b988d600301548c611bab90919063ffffffff16565b90611bab565b93505050505b9392505050565b600082611bba57506000611c21565b82820282848281611bc757fe5b0414611c1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612a4e6021913960400191505060405180910390fd5b90505b92915050565b6000808211611c9757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611ca057fe5b049392505050565b600060018381548110611cb757fe5b60009182526020909120600690910201805490915073ffffffffffffffffffffffffffffffffffffffff16611d4d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f706f6f6c206e6f7420666f756e64000000000000000000000000000000000000604482015290519081900360640190fd5b600481015460ff1615611dc157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f706f6f6c20636c6f736564000000000000000000000000000000000000000000604482015290519081900360640190fd5b611dec611dcc611831565b825473ffffffffffffffffffffffffffffffffffffffff16903085612585565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260026020818152604080842087855282528084208054825180840190935242835282840188815260018083018455838852949096209251948102909201938455935192909101919091556005830154611e619085612620565b6005840155825460028401546040805184815260208101889052808201929092525173ffffffffffffffffffffffffffffffffffffffff808a169389939116917f76e324f068a8bf6d168b3249574fe4ad25b9f378d8645319674b654c58850b2e9181900360600190a4505050505050565b600060018481548110611ee257fe5b60009182526020909120600690910201805490915073ffffffffffffffffffffffffffffffffffffffff16611f7857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f706f6f6c206e6f7420666f756e64000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff851660009081526002602090815260408083208784529091529020805461201557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6f207374616b65730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60008080805b875181101561227f57600088828151811061203257fe5b60200260200101519050816000148061204a57508085105b6120b557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f756e736f72746564207374616b65206964730000000000000000000000000000604482015290519081900360640190fd5b8554811061212457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f77726f6e67207374616b65206964000000000000000000000000000000000000604482015290519081900360640190fd5b809450600086828154811061213557fe5b906000526020600020906002020190506000806121668a848d888151811061215957fe5b60200260200101516122a1565b915091506121948b868151811061217957fe5b6020026020010151846001015461248190919063ffffffff16565b83600101819055508d73ffffffffffffffffffffffffffffffffffffffff168d8b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f0b598c0d1c4a0eff9fe8687a16f795524df83784a7cc2a7946718e49f7c47f9b8f898151811061221c57fe5b60200260200101518f8a8151811061223057fe5b6020908102919091018101516040805193845291830152818101879052519081900360600190a46122618783612620565b965061226d8682612620565b9550506001909301925061201b915050565b50611a9a8161229b84886005015461248190919063ffffffff16565b90612481565b600080600084600001541161231757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f696e636f7272656374207374616b650000000000000000000000000000000000604482015290519081900360640190fd5b6000831161238657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f77726f6e6720616d6f756e740000000000000000000000000000000000000000604482015290519081900360640190fd5b83600101548311156123f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6869676820616d6f756e74000000000000000000000000000000000000000000604482015290519081900360640190fd5b612404858585611afc565b905082811061247457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f756e7374616b65206e6f7420617661696c61626c652079657400000000000000604482015290519081900360640190fd5b8083039150935093915050565b6000828211156124f257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261070d908490612694565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261261a908590612694565b50505050565b600082820183811015611c1e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006126f6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661276c9092919063ffffffff16565b80519091501561070d5780806020019051602081101561271557600080fd5b505161070d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612a6f602a913960400191505060405180910390fd5b606061277b8484600085612783565b949350505050565b6060824710156127de576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612a286026913960400191505060405180910390fd5b6127e78561293d565b61285257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b602083106128bb57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161287e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461291d576040519150601f19603f3d011682016040523d82523d6000602084013e612922565b606091505b5091509150612932828286612943565b979650505050505050565b3b151590565b60608315612952575081611ba4565b8251156129625782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156129c65781810151838201526020016129ae565b50505050905090810190601f1680156129f35780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220ef40588a949dbda18dea8a0a3e0055ebc90033b75dae84f25ca2fcf22ea7a2a264736f6c63430007060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.030802 | 195,649.0889 | $6,026.29 |
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.