Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 6 from a total of 6 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Deploy Computed ... | 18766329 | 209 days ago | IN | 0 ETH | 0.06917044 | ||||
Deploy Computed ... | 18766288 | 209 days ago | IN | 0 ETH | 0.07181201 | ||||
Deploy Computed ... | 18766206 | 210 days ago | IN | 0 ETH | 0.06651147 | ||||
Deploy Computed ... | 18766113 | 210 days ago | IN | 0 ETH | 0.07351546 | ||||
Transfer Ownersh... | 18745163 | 212 days ago | IN | 0 ETH | 0.00143115 | ||||
0x60806040 | 18745159 | 212 days ago | IN | Create: RewardApeFactoryV2 | 0 ETH | 0.10844265 |
Latest 4 internal transactions
Advanced mode:
Parent Transaction Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
18766329 | 209 days ago | Contract Creation | 0 ETH | |||
18766288 | 209 days ago | Contract Creation | 0 ETH | |||
18766206 | 210 days ago | Contract Creation | 0 ETH | |||
18766113 | 210 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
RewardApeFactoryV2
Compiler Version
v0.8.4+commit.c7e474f2
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./ERC20RewardApeV1.sol"; import "./interfaces/IPoolManager.sol"; contract RewardApeFactoryV2 is Ownable { address public defaultOwner; event DeployedPoolContract( address indexed pool, address stakeToken, address rewardToken, uint256 rewardPerSecond, uint256 startTime, uint256 bonusEndTime, address owner ); constructor(address _defaultOwner) { defaultOwner = _defaultOwner; } function deployDefaultPoolContract( IERC20 _stakeToken, IERC20 _rewardToken, uint256 _rewardPerSecond, uint256 _startTime, uint256 _bonusEndTime ) public { deployPoolContract( _stakeToken, _rewardToken, _rewardPerSecond, _startTime, _bonusEndTime, defaultOwner ); } function deployPoolContract( IERC20 _stakeToken, IERC20 _rewardToken, uint256 _rewardPerSecond, uint256 _startTime, uint256 _bonusEndTime, address _owner ) public { ERC20RewardApeV1 pool = new ERC20RewardApeV1(); pool.initialize( _stakeToken, _rewardToken, _rewardPerSecond, _startTime, _bonusEndTime ); pool.transferOwnership(_owner); emit DeployedPoolContract( address(pool), address(_stakeToken), address(_rewardToken), _rewardPerSecond, _startTime, _bonusEndTime, _owner ); } function deployComputedPoolContract( IERC20 _stakeToken, IERC20 _rewardToken, uint256 _startTime, uint256 _secondsDuration, uint256 _totalRewards, address _owner ) public { (uint256 rewardPerSecond, uint256 bonusEndTime) = calculatedConfig( _totalRewards, _startTime, _secondsDuration ); deployPoolContract( _stakeToken, _rewardToken, rewardPerSecond, _startTime, bonusEndTime, _owner ); } function calculatedConfig( uint256 _totalRewards, uint256 _startTime, uint256 _secondsDuration ) public pure returns (uint256 rewardsPerSecond, uint256 bonusEndTime) { rewardsPerSecond = _totalRewards / _secondsDuration; bonusEndTime = _startTime + _secondsDuration; return (rewardsPerSecond, bonusEndTime); } function updateDefaultOwner(address _defaultOwner) public onlyOwner { defaultOwner = _defaultOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /* ______ ______ / \ / \ | ▓▓▓▓▓▓\ ______ ______ | ▓▓▓▓▓▓\__ __ __ ______ ______ | ▓▓__| ▓▓/ \ / \| ▓▓___\▓▓ \ | \ | \| \ / \ | ▓▓ ▓▓ ▓▓▓▓▓▓\ ▓▓▓▓▓▓\\▓▓ \| ▓▓ | ▓▓ | ▓▓ \▓▓▓▓▓▓\ ▓▓▓▓▓▓\ | ▓▓▓▓▓▓▓▓ ▓▓ | ▓▓ ▓▓ ▓▓_\▓▓▓▓▓▓\ ▓▓ | ▓▓ | ▓▓/ ▓▓ ▓▓ | ▓▓ | ▓▓ | ▓▓ ▓▓__/ ▓▓ ▓▓▓▓▓▓▓▓ \__| ▓▓ ▓▓_/ ▓▓_/ ▓▓ ▓▓▓▓▓▓▓ ▓▓__/ ▓▓ | ▓▓ | ▓▓ ▓▓ ▓▓\▓▓ \\▓▓ ▓▓\▓▓ ▓▓ ▓▓\▓▓ ▓▓ ▓▓ ▓▓ \▓▓ \▓▓ ▓▓▓▓▓▓▓ \▓▓▓▓▓▓▓ \▓▓▓▓▓▓ \▓▓▓▓▓\▓▓▓▓ \▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓ | ▓▓ | ▓▓ | ▓▓ | ▓▓ \▓▓ \▓▓ * App: https://ApeSwap.finance * Medium: https://ape-swap.medium.com * Twitter: https://twitter.com/ape_swap * Telegram: https://t.me/ape_swap * Announcements: https://t.me/ape_swap_news * Discord: https://discord.com/ApeSwap * Reddit: https://reddit.com/r/ApeSwap * Instagram: https://instagram.com/ApeSwap.finance * GitHub: https://github.com/ApeSwapFinance */ import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract ERC20RewardApeV1 is ReentrancyGuard, Ownable, Initializable { using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. } // Info of each pool. struct PoolInfo { IERC20 lpToken; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. Rewards to distribute per second. uint256 lastRewardTime; // Last timestamp that Rewards distribution occurs. uint256 accRewardTokenPerShare; // Accumulated Rewards per share, times 1e30. See below. } // The stake token IERC20 public STAKE_TOKEN; // The reward token IERC20 public REWARD_TOKEN; // Is native token reward bool public isNativeTokenReward; // Reward tokens created per second. uint256 public rewardPerSecond; // Keep track of number of tokens staked in case the contract earns reflect fees uint256 public totalStaked = 0; // Keep track of number of reward tokens paid to find remaining reward balance uint256 public totalRewardsPaid = 0; // Keep track of number of reward tokens paid to find remaining reward balance uint256 public totalRewardsAllocated = 0; // Info of each pool. PoolInfo public poolInfo; // Info of each user that stakes LP tokens. mapping(address => UserInfo) public userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 private totalAllocPoint = 0; // The timestamp number when Reward mining starts. uint256 public startTime; // The timestamp number when mining ends. uint256 public bonusEndTime; event Deposit(address indexed sender, address indexed user, uint256 amount); event DepositRewards(uint256 amount); event Withdraw(address indexed user, uint256 amount); event EmergencyWithdraw(address indexed user, uint256 amount); event SkimStakeTokenFees(address indexed user, uint256 amount); event LogUpdatePool(uint256 bonusEndTime, uint256 rewardPerSecond); event EmergencyRewardWithdraw(address indexed user, uint256 amount); event EmergencySweepWithdraw( address indexed user, IERC20 indexed token, uint256 amount ); function initialize( IERC20 _stakeToken, IERC20 _rewardToken, uint256 _rewardPerSecond, uint256 _startTime, uint256 _bonusEndTime ) external initializer { if (address(_rewardToken) == address(0)) { isNativeTokenReward = true; } STAKE_TOKEN = _stakeToken; REWARD_TOKEN = _rewardToken; rewardPerSecond = _rewardPerSecond; startTime = _startTime; bonusEndTime = _bonusEndTime; // staking pool poolInfo = PoolInfo({ lpToken: _stakeToken, allocPoint: 1000, lastRewardTime: startTime, accRewardTokenPerShare: 0 }); totalAllocPoint = 1000; } // Return reward multiplier over the given _from to _to timestamp. function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) { if (_to <= bonusEndTime) { return _to - _from; } else if (_from >= bonusEndTime) { return 0; } else { return bonusEndTime - _from; } } /// @param _bonusEndTime The timestamp when rewards will end function setBonusEndTime(uint256 _bonusEndTime) external onlyOwner { require( _bonusEndTime > block.timestamp, "new bonus end timestamp must be greater than current" ); bonusEndTime = _bonusEndTime; emit LogUpdatePool(bonusEndTime, rewardPerSecond); } // View function to see pending Reward on frontend. function pendingReward(address _user) external view returns (uint256 pending) { UserInfo storage user = userInfo[_user]; uint256 accRewardTokenPerShare = poolInfo.accRewardTokenPerShare; if (block.timestamp > poolInfo.lastRewardTime && totalStaked != 0) { uint256 multiplier = getMultiplier( poolInfo.lastRewardTime, block.timestamp ); uint256 tokenReward = (multiplier * rewardPerSecond * poolInfo.allocPoint) / totalAllocPoint; accRewardTokenPerShare = accRewardTokenPerShare + ((tokenReward * 1e30) / totalStaked); } pending = (user.amount * accRewardTokenPerShare) / 1e30 - user.rewardDebt; } // Update reward variables of the given pool to be up-to-date. function updatePool() public { if (block.timestamp <= poolInfo.lastRewardTime) { return; } if (totalStaked == 0) { poolInfo.lastRewardTime = block.timestamp; return; } uint256 multiplier = getMultiplier( poolInfo.lastRewardTime, block.timestamp ); uint256 tokenReward = (multiplier * rewardPerSecond * poolInfo.allocPoint) / totalAllocPoint; totalRewardsAllocated += tokenReward; poolInfo.accRewardTokenPerShare = poolInfo.accRewardTokenPerShare + ((tokenReward * 1e30) / totalStaked); poolInfo.lastRewardTime = block.timestamp; } /// Deposit staking token into the contract to earn rewards. /// @dev Since this contract needs to be supplied with rewards we are /// sending the balance of the contract if the pending rewards are higher /// @param _amount The amount of staking tokens to deposit function deposit(uint256 _amount) external nonReentrant { _depositTo(_amount, msg.sender); } function depositTo(uint256 _amount, address _user) external nonReentrant { require(_user != address(0), "Can't deposit for null address"); _depositTo(_amount, _user); } function _depositTo(uint256 _amount, address _user) internal { UserInfo storage user = userInfo[_user]; updatePool(); if (user.amount > 0) { uint256 pending = (user.amount * poolInfo.accRewardTokenPerShare) / 1e30 - user.rewardDebt; if (pending > 0) { // If rewardBalance is low then revert to avoid losing the user's rewards require( rewardBalance() >= pending, "insufficient reward balance" ); safeTransferRewardInternal(_user, pending, true); } } uint256 finalDepositAmount = 0; if (_amount > 0) { uint256 preStakeBalance = STAKE_TOKEN.balanceOf(address(this)); poolInfo.lpToken.safeTransferFrom( address(msg.sender), address(this), _amount ); finalDepositAmount = STAKE_TOKEN.balanceOf(address(this)) - preStakeBalance; user.amount = user.amount + finalDepositAmount; totalStaked = totalStaked + finalDepositAmount; } user.rewardDebt = (user.amount * poolInfo.accRewardTokenPerShare) / 1e30; emit Deposit(msg.sender, _user, finalDepositAmount); } /// Withdraw rewards and/or staked tokens. Pass a 0 amount to withdraw only rewards /// @param _amount The amount of staking tokens to withdraw function withdraw(uint256 _amount) external nonReentrant { UserInfo storage user = userInfo[msg.sender]; require(user.amount >= _amount, "withdraw: not good"); updatePool(); uint256 pending = (user.amount * poolInfo.accRewardTokenPerShare) / 1e30 - user.rewardDebt; if (pending > 0) { // If rewardBalance is low then revert to avoid losing the user's rewards require(rewardBalance() >= pending, "insufficient reward balance"); safeTransferRewardInternal(address(msg.sender), pending, true); } if (_amount > 0) { user.amount = user.amount - _amount; poolInfo.lpToken.safeTransfer(address(msg.sender), _amount); totalStaked = totalStaked - _amount; } user.rewardDebt = (user.amount * poolInfo.accRewardTokenPerShare) / 1e30; emit Withdraw(msg.sender, _amount); } /// Obtain the reward balance of this contract /// @return wei balance of contract function rewardBalance() public view returns (uint256) { if (isNativeTokenReward) { return address(this).balance; } else { // Return ERC20 balance uint256 balance = REWARD_TOKEN.balanceOf(address(this)); if (STAKE_TOKEN == REWARD_TOKEN) { return balance - totalStaked; } return balance; } } /// Get the balance of rewards that have not been harvested /// @return wei balance of rewards left to be paid function getUnharvestedRewards() public view returns (uint256) { return totalRewardsAllocated - totalRewardsPaid; } // Deposit Rewards into contract function depositRewards(uint256 _amount) external { require(!isNativeTokenReward, "Reward is native token"); require(_amount > 0, "Deposit value must be greater than 0."); REWARD_TOKEN.safeTransferFrom( address(msg.sender), address(this), _amount ); emit DepositRewards(_amount); } /// @param _to address to send reward token to /// @param _amount value of reward token to transfer function safeTransferRewardInternal( address _to, uint256 _amount, bool _sumRewards ) internal { require(_amount <= rewardBalance(), "not enough reward token"); if (_sumRewards) { totalRewardsPaid += _amount; } if (isNativeTokenReward) { // Transfer native token to address (bool success, ) = _to.call{gas: 23000, value: _amount}(""); require(success, "TransferHelper: NATIVE_TRANSFER_FAILED"); } else { // Transfer ERC20 to address REWARD_TOKEN.safeTransfer(_to, _amount); } } /// @dev Obtain the stake balance of this contract function totalStakeTokenBalance() public view returns (uint256) { if (STAKE_TOKEN == REWARD_TOKEN) return totalStaked; return STAKE_TOKEN.balanceOf(address(this)); } /// @dev Obtain the stake token fees (if any) earned by reflect token /// @notice If STAKE_TOKEN == REWARD_TOKEN there are no fees to skim function getStakeTokenFeeBalance() public view returns (uint256) { return totalStakeTokenBalance() - totalStaked; } /* Admin Functions */ /// @param _rewardPerSecond The amount of reward tokens to be given per second function setRewardPerSecond(uint256 _rewardPerSecond) external onlyOwner { rewardPerSecond = _rewardPerSecond; emit LogUpdatePool(bonusEndTime, rewardPerSecond); } /// @dev Remove excess stake tokens earned by reflect fees function skimStakeTokenFees(address _to) external onlyOwner { uint256 stakeTokenFeeBalance = getStakeTokenFeeBalance(); STAKE_TOKEN.safeTransfer(_to, stakeTokenFeeBalance); emit SkimStakeTokenFees(_to, stakeTokenFeeBalance); } /* Emergency Functions */ // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw() external nonReentrant { UserInfo storage user = userInfo[msg.sender]; poolInfo.lpToken.safeTransfer(address(msg.sender), user.amount); totalStaked = totalStaked - user.amount; user.amount = 0; user.rewardDebt = 0; emit EmergencyWithdraw(msg.sender, user.amount); } // Withdraw reward. EMERGENCY ONLY. function emergencyRewardWithdraw(uint256 _amount) external onlyOwner { // Withdraw rewards safeTransferRewardInternal(msg.sender, _amount, false); emit EmergencyRewardWithdraw(msg.sender, _amount); } /// @notice A public function to sweep accidental BEP20 transfers to this contract. /// Tokens are sent to owner /// @param token The address of the BEP20 token to sweep function sweepToken(IERC20 token) external onlyOwner { require( address(token) != address(STAKE_TOKEN), "can not sweep stake token" ); require( address(token) != address(REWARD_TOKEN), "can not sweep reward token" ); uint256 balance = token.balanceOf(address(this)); token.safeTransfer(msg.sender, balance); emit EmergencySweepWithdraw(msg.sender, token, balance); } receive() external payable { if (!isNativeTokenReward) { revert("Reward token is not native"); } } }
// SPDX-License-Identifier: HORNEY pragma solidity ^0.8.0; interface IPoolManager { function addPool(address _pool, bool _isLegacy) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT 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() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT 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 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 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 pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
{ "metadata": { "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_defaultOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"address","name":"stakeToken","type":"address"},{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"rewardPerSecond","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bonusEndTime","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"DeployedPoolContract","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"},{"inputs":[{"internalType":"uint256","name":"_totalRewards","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_secondsDuration","type":"uint256"}],"name":"calculatedConfig","outputs":[{"internalType":"uint256","name":"rewardsPerSecond","type":"uint256"},{"internalType":"uint256","name":"bonusEndTime","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"defaultOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_stakeToken","type":"address"},{"internalType":"contract IERC20","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_secondsDuration","type":"uint256"},{"internalType":"uint256","name":"_totalRewards","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"}],"name":"deployComputedPoolContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_stakeToken","type":"address"},{"internalType":"contract IERC20","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_rewardPerSecond","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_bonusEndTime","type":"uint256"}],"name":"deployDefaultPoolContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_stakeToken","type":"address"},{"internalType":"contract IERC20","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_rewardPerSecond","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_bonusEndTime","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"}],"name":"deployPoolContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"address","name":"_defaultOwner","type":"address"}],"name":"updateDefaultOwner","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161264838038061264883398101604081905261002f916100ad565b6100383361005d565b600180546001600160a01b0319166001600160a01b03929092169190911790556100db565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100be578081fd5b81516001600160a01b03811681146100d4578182fd5b9392505050565b61255e806100ea6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063715018a611610066578063715018a6146101185780638da5cb5b14610120578063afa5897d14610131578063f294d27614610144578063f2fde38b1461015757600080fd5b806315123b861461009857806317de2f1f146100ad57806341c12e75146100dd5780634b22737114610105575b600080fd5b6100ab6100a6366004610544565b61016a565b005b6001546100c0906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100f06100eb3660046105aa565b610194565b604080519283526020830191909152016100d4565b6100ab6101133660046104d1565b6101b7565b6100ab61020c565b6000546001600160a01b03166100c0565b6100ab61013f3660046104f4565b610242565b6100ab610152366004610544565b610268565b6100ab6101653660046104d1565b6103d9565b600080610178848787610194565b9150915061018a888884898588610268565b5050505050505050565b6000806101a1838661062e565b91506101ad838561060a565b9050935093915050565b6000546001600160a01b031633146101ea5760405162461bcd60e51b81526004016101e1906105d5565b60405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146102365760405162461bcd60e51b81526004016101e1906105d5565b6102406000610474565b565b60015461026190869086908690869086906001600160a01b0316610268565b5050505050565b6000604051610276906104c4565b604051809103906000f080158015610292573d6000803e3d6000fd5b5060405163344fe42d60e21b81526001600160a01b03898116600483015288811660248301526044820188905260648201879052608482018690529192509082169063d13f90b49060a401600060405180830381600087803b1580156102f757600080fd5b505af115801561030b573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0385811660048301528416925063f2fde38b9150602401600060405180830381600087803b15801561035257600080fd5b505af1158015610366573d6000803e3d6000fd5b5050604080516001600160a01b038b811682528a81166020830152918101899052606081018890526080810187905285821660a082015290841692507f5ac0ddb285bc5b66f096c9fcf6ab4e3bd0d2e1c347adf86f2accb255725a8c36915060c00160405180910390a250505050505050565b6000546001600160a01b031633146104035760405162461bcd60e51b81526004016101e1906105d5565b6001600160a01b0381166104685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101e1565b61047181610474565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611ec58061066483390190565b6000602082840312156104e2578081fd5b81356104ed8161064e565b9392505050565b600080600080600060a0868803121561050b578081fd5b85356105168161064e565b945060208601356105268161064e565b94979496505050506040830135926060810135926080909101359150565b60008060008060008060c0878903121561055c578081fd5b86356105678161064e565b955060208701356105778161064e565b945060408701359350606087013592506080870135915060a087013561059c8161064e565b809150509295509295509295565b6000806000606084860312156105be578283fd5b505081359360208301359350604090920135919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561062957634e487b7160e01b81526011600452602481fd5b500190565b60008261064957634e487b7160e01b81526012600452602481fd5b500490565b6001600160a01b038116811461047157600080fdfe60806040526000600555600060065560006007556000600d5534801561002457600080fd5b50600160005561003333610038565b61008a565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611e2c806100996000396000f3fe6080604052600436106101e75760003560e01c80638bdf67f211610102578063bbac08f411610095578063e3161ddd11610064578063e3161ddd146105f6578063ee1a62951461060b578063f2fde38b14610621578063f40f0f521461064157600080fd5b8063bbac08f414610581578063d13f90b4146105a1578063db2e21bc146105c1578063db64d8c0146105d657600080fd5b806399248ea7116100d157806399248ea714610517578063a49ceb1914610537578063aa5c3ab41461054c578063b6b55f251461056157600080fd5b80638bdf67f2146104a35780638da5cb5b146104c35780638dbb1e3a146104e15780638f10369a1461050157600080fd5b80635a2f3d091161017a57806374958e351161014957806374958e351461044c57806378e9792514610462578063812bc70814610478578063817b1cd21461048d57600080fd5b80635a2f3d09146103a157806366da5815146103f757806370aff70f14610417578063715018a61461043757600080fd5b80631c39b672116101b65780631c39b672146103135780632e1a7d4d1461034b5780633279beab1461036b57806341744f7b1461038b57600080fd5b8063074bad1d1461025157806309e4e7ab146102875780631959a002146102aa5780631be19560146102f357600080fd5b3661024c57600354600160a01b900460ff1661024a5760405162461bcd60e51b815260206004820152601a60248201527f52657761726420746f6b656e206973206e6f74206e617469766500000000000060448201526064015b60405180910390fd5b005b600080fd5b34801561025d57600080fd5b5060035461027290600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b34801561029357600080fd5b5061029c610661565b60405190815260200161027e565b3480156102b657600080fd5b506102de6102c5366004611b6a565b600c602052600090815260409020805460019091015482565b6040805192835260208301919091520161027e565b3480156102ff57600080fd5b5061024a61030e366004611b6a565b610678565b34801561031f57600080fd5b50600254610333906001600160a01b031681565b6040516001600160a01b03909116815260200161027e565b34801561035757600080fd5b5061024a610366366004611bf6565b610832565b34801561037757600080fd5b5061024a610386366004611bf6565b610a03565b34801561039757600080fd5b5061029c60075481565b3480156103ad57600080fd5b50600854600954600a54600b546103cd936001600160a01b031692919084565b604080516001600160a01b039095168552602085019390935291830152606082015260800161027e565b34801561040357600080fd5b5061024a610412366004611bf6565b610a71565b34801561042357600080fd5b5061024a610432366004611c26565b610ae0565b34801561044357600080fd5b5061024a610b71565b34801561045857600080fd5b5061029c60065481565b34801561046e57600080fd5b5061029c600e5481565b34801561048457600080fd5b5061029c610ba7565b34801561049957600080fd5b5061029c60055481565b3480156104af57600080fd5b5061024a6104be366004611bf6565b610bbe565b3480156104cf57600080fd5b506001546001600160a01b0316610333565b3480156104ed57600080fd5b5061029c6104fc366004611c55565b610cb7565b34801561050d57600080fd5b5061029c60045481565b34801561052357600080fd5b50600354610333906001600160a01b031681565b34801561054357600080fd5b5061029c610cf8565b34801561055857600080fd5b5061029c610d96565b34801561056d57600080fd5b5061024a61057c366004611bf6565b610e60565b34801561058d57600080fd5b5061024a61059c366004611b6a565b610e9a565b3480156105ad57600080fd5b5061024a6105bc366004611ba6565b610f2f565b3480156105cd57600080fd5b5061024a6110a2565b3480156105e257600080fd5b5061024a6105f1366004611bf6565b61114f565b34801561060257600080fd5b5061024a611224565b34801561061757600080fd5b5061029c600f5481565b34801561062d57600080fd5b5061024a61063c366004611b6a565b6112ce565b34801561064d57600080fd5b5061029c61065c366004611b6a565b611369565b60006006546007546106739190611d88565b905090565b6001546001600160a01b031633146106a25760405162461bcd60e51b815260040161024190611cc5565b6002546001600160a01b03828116911614156107005760405162461bcd60e51b815260206004820152601960248201527f63616e206e6f74207377656570207374616b6520746f6b656e000000000000006044820152606401610241565b6003546001600160a01b038281169116141561075e5760405162461bcd60e51b815260206004820152601a60248201527f63616e206e6f742073776565702072657761726420746f6b656e0000000000006044820152606401610241565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b1580156107a057600080fd5b505afa1580156107b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d89190611c0e565b90506107ee6001600160a01b038316338361144a565b6040518181526001600160a01b0383169033907f9186304ffe50c568e430e57234122976c83522da68345954bb5485cbab3957139060200160405180910390a35050565b600260005414156108555760405162461bcd60e51b815260040161024190611cfa565b60026000908155338152600c6020526040902080548211156108ae5760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b6044820152606401610241565b6108b6611224565b6001810154600b5482546000929168327cb2734119d3b7a9601e1b916108dc9190611d69565b6108e69190611d49565b6108f09190611d88565b9050801561095b5780610901610d96565b101561094f5760405162461bcd60e51b815260206004820152601b60248201527f696e73756666696369656e74207265776172642062616c616e636500000000006044820152606401610241565b61095b338260016114b2565b821561099957815461096e908490611d88565b8255600854610987906001600160a01b0316338561144a565b826005546109959190611d88565b6005555b600b54825468327cb2734119d3b7a9601e1b916109b591611d69565b6109bf9190611d49565b600183015560405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a25050600160005550565b6001546001600160a01b03163314610a2d5760405162461bcd60e51b815260040161024190611cc5565b610a39338260006114b2565b60405181815233907f2d4434bb59801e733e9ce3df40b0c5518861a5fcdeec1906e83e03c755872b429060200160405180910390a250565b6001546001600160a01b03163314610a9b5760405162461bcd60e51b815260040161024190611cc5565b6004819055600f5460408051918252602082018390527f055418cabed8a0ec732dd9b1f84e69d3f33a8f9a70d721b7a6962a00c26a457291015b60405180910390a150565b60026000541415610b035760405162461bcd60e51b815260040161024190611cfa565b60026000556001600160a01b038116610b5e5760405162461bcd60e51b815260206004820152601e60248201527f43616e2774206465706f73697420666f72206e756c6c206164647265737300006044820152606401610241565b610b68828261160c565b50506001600055565b6001546001600160a01b03163314610b9b5760405162461bcd60e51b815260040161024190611cc5565b610ba56000611894565b565b6000600554610bb4610cf8565b6106739190611d88565b600354600160a01b900460ff1615610c115760405162461bcd60e51b81526020600482015260166024820152752932bbb0b9321034b9903730ba34bb32903a37b5b2b760511b6044820152606401610241565b60008111610c6f5760405162461bcd60e51b815260206004820152602560248201527f4465706f7369742076616c7565206d757374206265206772656174657220746860448201526430b710181760d91b6064820152608401610241565b600354610c87906001600160a01b03163330846118e6565b6040518181527f754fe3a3c69256b66ca56365fda4bbf3299d7c94038c105ffd43fb4b37f56db690602001610ad5565b6000600f548211610cd357610ccc8383611d88565b9050610cf2565b600f548310610ce457506000610cf2565b82600f54610ccc9190611d88565b92915050565b6003546002546000916001600160a01b0391821691161415610d1b575060055490565b6002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015610d5e57600080fd5b505afa158015610d72573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106739190611c0e565b600354600090600160a01b900460ff1615610db057504790565b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610df457600080fd5b505afa158015610e08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2c9190611c0e565b6003546002549192506001600160a01b0391821691161415610e5b57600554610e559082611d88565b91505090565b919050565b60026000541415610e835760405162461bcd60e51b815260040161024190611cfa565b6002600055610e92813361160c565b506001600055565b6001546001600160a01b03163314610ec45760405162461bcd60e51b815260040161024190611cc5565b6000610ece610ba7565b600254909150610ee8906001600160a01b0316838361144a565b816001600160a01b03167feb4e6a6a8d3c8edbd6ef48316a3670cfa0e6374eebe3f555e620399f866d2f3282604051610f2391815260200190565b60405180910390a25050565b600154600160a81b900460ff1680610f515750600154600160a01b900460ff16155b610fb45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610241565b600154600160a81b900460ff16158015610fde576001805461ffff60a01b191661010160a01b1790555b6001600160a01b038516611000576003805460ff60a01b1916600160a01b1790555b600280546001600160a01b038089166001600160a01b03199283168117909355600380549189169183169190911790556004869055600e859055600f849055604080516080810182528381526103e86020820181905291810187905260006060909101819052600880549093169093179091556009819055600a859055600b91909155600d55801561109a576001805460ff60a81b191690555b505050505050565b600260005414156110c55760405162461bcd60e51b815260040161024190611cfa565b6002600090815533808252600c6020526040909120805460085491926110f4926001600160a01b03169161144a565b80546005546111039190611d88565b60055560008082556001820181905560405190815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2506001600055565b6001546001600160a01b031633146111795760405162461bcd60e51b815260040161024190611cc5565b4281116111e55760405162461bcd60e51b815260206004820152603460248201527f6e657720626f6e757320656e642074696d657374616d70206d7573742062652060448201527319dc99585d195c881d1a185b8818dd5c9c995b9d60621b6064820152608401610241565b600f8190556004546040805183815260208101929092527f055418cabed8a0ec732dd9b1f84e69d3f33a8f9a70d721b7a6962a00c26a45729101610ad5565b600a54421161122f57565b60055461123c5742600a55565b600061124d60086002015442610cb7565b600d546009546004549293506000926112669085611d69565b6112709190611d69565b61127a9190611d49565b9050806007600082825461128e9190611d31565b90915550506005546112ac8268327cb2734119d3b7a9601e1b611d69565b6112b69190611d49565b600b546112c39190611d31565b600b55505042600a55565b6001546001600160a01b031633146112f85760405162461bcd60e51b815260040161024190611cc5565b6001600160a01b03811661135d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610241565b61136681611894565b50565b6001600160a01b0381166000908152600c60205260408120600b54600a5442118015611396575060055415155b1561140e5760006113ac60086002015442610cb7565b600d546009546004549293506000926113c59085611d69565b6113cf9190611d69565b6113d99190611d49565b6005549091506113f58268327cb2734119d3b7a9601e1b611d69565b6113ff9190611d49565b6114099084611d31565b925050505b6001820154825468327cb2734119d3b7a9601e1b9061142e908490611d69565b6114389190611d49565b6114429190611d88565b949350505050565b6040516001600160a01b0383166024820152604481018290526114ad90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261191e565b505050565b6114ba610d96565b8211156115095760405162461bcd60e51b815260206004820152601760248201527f6e6f7420656e6f7567682072657761726420746f6b656e0000000000000000006044820152606401610241565b80156115275781600660008282546115219190611d31565b90915550505b600354600160a01b900460ff16156115f5576000836001600160a01b03166159d884604051600060405180830381858888f193505050503d806000811461158a576040519150601f19603f3d011682016040523d82523d6000602084013e61158f565b606091505b50509050806115ef5760405162461bcd60e51b815260206004820152602660248201527f5472616e7366657248656c7065723a204e41544956455f5452414e534645525f60448201526511905253115160d21b6064820152608401610241565b50505050565b6003546114ad906001600160a01b0316848461144a565b6001600160a01b0381166000908152600c6020526040902061162c611224565b8054156116da576001810154600b5482546000929168327cb2734119d3b7a9601e1b916116599190611d69565b6116639190611d49565b61166d9190611d88565b905080156116d8578061167e610d96565b10156116cc5760405162461bcd60e51b815260206004820152601b60248201527f696e73756666696369656e74207265776172642062616c616e636500000000006044820152606401610241565b6116d8838260016114b2565b505b60008315611823576002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561172657600080fd5b505afa15801561173a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061175e9190611c0e565b600854909150611779906001600160a01b03163330886118e6565b6002546040516370a0823160e01b815230600482015282916001600160a01b0316906370a082319060240160206040518083038186803b1580156117bc57600080fd5b505afa1580156117d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f49190611c0e565b6117fe9190611d88565b835490925061180e908390611d31565b835560055461181e908390611d31565b600555505b600b54825468327cb2734119d3b7a9601e1b9161183f91611d69565b6118499190611d49565b60018301556040518181526001600160a01b0384169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f629060200160405180910390a350505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526115ef9085906323b872dd60e01b90608401611476565b6000611973826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119f09092919063ffffffff16565b8051909150156114ad57808060200190518101906119919190611b86565b6114ad5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610241565b60606119ff8484600085611a09565b90505b9392505050565b606082471015611a6a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610241565b843b611ab85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610241565b600080866001600160a01b03168587604051611ad49190611c76565b60006040518083038185875af1925050503d8060008114611b11576040519150601f19603f3d011682016040523d82523d6000602084013e611b16565b606091505b5091509150611b26828286611b31565b979650505050505050565b60608315611b40575081611a02565b825115611b505782518084602001fd5b8160405162461bcd60e51b81526004016102419190611c92565b600060208284031215611b7b578081fd5b8135611a0281611de1565b600060208284031215611b97578081fd5b81518015158114611a02578182fd5b600080600080600060a08688031215611bbd578081fd5b8535611bc881611de1565b94506020860135611bd881611de1565b94979496505050506040830135926060810135926080909101359150565b600060208284031215611c07578081fd5b5035919050565b600060208284031215611c1f578081fd5b5051919050565b60008060408385031215611c38578182fd5b823591506020830135611c4a81611de1565b809150509250929050565b60008060408385031215611c67578182fd5b50508035926020909101359150565b60008251611c88818460208701611d9f565b9190910192915050565b6020815260008251806020840152611cb1816040850160208701611d9f565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115611d4457611d44611dcb565b500190565b600082611d6457634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611d8357611d83611dcb565b500290565b600082821015611d9a57611d9a611dcb565b500390565b60005b83811015611dba578181015183820152602001611da2565b838111156115ef5750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461136657600080fdfea2646970667358221220e31cb3d85b2acd3d7e216fbc915425f62fd7b30315cb937ee867d5ea81e0c6fa64736f6c63430008040033a2646970667358221220540e79eb2df1ef55020e1228144e6d68e6af801a3f3ba0ebe3370422803de5e564736f6c634300080400330000000000000000000000006c905b4108a87499ced1e0498721f2b831c6ab13
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063715018a611610066578063715018a6146101185780638da5cb5b14610120578063afa5897d14610131578063f294d27614610144578063f2fde38b1461015757600080fd5b806315123b861461009857806317de2f1f146100ad57806341c12e75146100dd5780634b22737114610105575b600080fd5b6100ab6100a6366004610544565b61016a565b005b6001546100c0906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100f06100eb3660046105aa565b610194565b604080519283526020830191909152016100d4565b6100ab6101133660046104d1565b6101b7565b6100ab61020c565b6000546001600160a01b03166100c0565b6100ab61013f3660046104f4565b610242565b6100ab610152366004610544565b610268565b6100ab6101653660046104d1565b6103d9565b600080610178848787610194565b9150915061018a888884898588610268565b5050505050505050565b6000806101a1838661062e565b91506101ad838561060a565b9050935093915050565b6000546001600160a01b031633146101ea5760405162461bcd60e51b81526004016101e1906105d5565b60405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146102365760405162461bcd60e51b81526004016101e1906105d5565b6102406000610474565b565b60015461026190869086908690869086906001600160a01b0316610268565b5050505050565b6000604051610276906104c4565b604051809103906000f080158015610292573d6000803e3d6000fd5b5060405163344fe42d60e21b81526001600160a01b03898116600483015288811660248301526044820188905260648201879052608482018690529192509082169063d13f90b49060a401600060405180830381600087803b1580156102f757600080fd5b505af115801561030b573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b0385811660048301528416925063f2fde38b9150602401600060405180830381600087803b15801561035257600080fd5b505af1158015610366573d6000803e3d6000fd5b5050604080516001600160a01b038b811682528a81166020830152918101899052606081018890526080810187905285821660a082015290841692507f5ac0ddb285bc5b66f096c9fcf6ab4e3bd0d2e1c347adf86f2accb255725a8c36915060c00160405180910390a250505050505050565b6000546001600160a01b031633146104035760405162461bcd60e51b81526004016101e1906105d5565b6001600160a01b0381166104685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101e1565b61047181610474565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611ec58061066483390190565b6000602082840312156104e2578081fd5b81356104ed8161064e565b9392505050565b600080600080600060a0868803121561050b578081fd5b85356105168161064e565b945060208601356105268161064e565b94979496505050506040830135926060810135926080909101359150565b60008060008060008060c0878903121561055c578081fd5b86356105678161064e565b955060208701356105778161064e565b945060408701359350606087013592506080870135915060a087013561059c8161064e565b809150509295509295509295565b6000806000606084860312156105be578283fd5b505081359360208301359350604090920135919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561062957634e487b7160e01b81526011600452602481fd5b500190565b60008261064957634e487b7160e01b81526012600452602481fd5b500490565b6001600160a01b038116811461047157600080fdfe60806040526000600555600060065560006007556000600d5534801561002457600080fd5b50600160005561003333610038565b61008a565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611e2c806100996000396000f3fe6080604052600436106101e75760003560e01c80638bdf67f211610102578063bbac08f411610095578063e3161ddd11610064578063e3161ddd146105f6578063ee1a62951461060b578063f2fde38b14610621578063f40f0f521461064157600080fd5b8063bbac08f414610581578063d13f90b4146105a1578063db2e21bc146105c1578063db64d8c0146105d657600080fd5b806399248ea7116100d157806399248ea714610517578063a49ceb1914610537578063aa5c3ab41461054c578063b6b55f251461056157600080fd5b80638bdf67f2146104a35780638da5cb5b146104c35780638dbb1e3a146104e15780638f10369a1461050157600080fd5b80635a2f3d091161017a57806374958e351161014957806374958e351461044c57806378e9792514610462578063812bc70814610478578063817b1cd21461048d57600080fd5b80635a2f3d09146103a157806366da5815146103f757806370aff70f14610417578063715018a61461043757600080fd5b80631c39b672116101b65780631c39b672146103135780632e1a7d4d1461034b5780633279beab1461036b57806341744f7b1461038b57600080fd5b8063074bad1d1461025157806309e4e7ab146102875780631959a002146102aa5780631be19560146102f357600080fd5b3661024c57600354600160a01b900460ff1661024a5760405162461bcd60e51b815260206004820152601a60248201527f52657761726420746f6b656e206973206e6f74206e617469766500000000000060448201526064015b60405180910390fd5b005b600080fd5b34801561025d57600080fd5b5060035461027290600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b34801561029357600080fd5b5061029c610661565b60405190815260200161027e565b3480156102b657600080fd5b506102de6102c5366004611b6a565b600c602052600090815260409020805460019091015482565b6040805192835260208301919091520161027e565b3480156102ff57600080fd5b5061024a61030e366004611b6a565b610678565b34801561031f57600080fd5b50600254610333906001600160a01b031681565b6040516001600160a01b03909116815260200161027e565b34801561035757600080fd5b5061024a610366366004611bf6565b610832565b34801561037757600080fd5b5061024a610386366004611bf6565b610a03565b34801561039757600080fd5b5061029c60075481565b3480156103ad57600080fd5b50600854600954600a54600b546103cd936001600160a01b031692919084565b604080516001600160a01b039095168552602085019390935291830152606082015260800161027e565b34801561040357600080fd5b5061024a610412366004611bf6565b610a71565b34801561042357600080fd5b5061024a610432366004611c26565b610ae0565b34801561044357600080fd5b5061024a610b71565b34801561045857600080fd5b5061029c60065481565b34801561046e57600080fd5b5061029c600e5481565b34801561048457600080fd5b5061029c610ba7565b34801561049957600080fd5b5061029c60055481565b3480156104af57600080fd5b5061024a6104be366004611bf6565b610bbe565b3480156104cf57600080fd5b506001546001600160a01b0316610333565b3480156104ed57600080fd5b5061029c6104fc366004611c55565b610cb7565b34801561050d57600080fd5b5061029c60045481565b34801561052357600080fd5b50600354610333906001600160a01b031681565b34801561054357600080fd5b5061029c610cf8565b34801561055857600080fd5b5061029c610d96565b34801561056d57600080fd5b5061024a61057c366004611bf6565b610e60565b34801561058d57600080fd5b5061024a61059c366004611b6a565b610e9a565b3480156105ad57600080fd5b5061024a6105bc366004611ba6565b610f2f565b3480156105cd57600080fd5b5061024a6110a2565b3480156105e257600080fd5b5061024a6105f1366004611bf6565b61114f565b34801561060257600080fd5b5061024a611224565b34801561061757600080fd5b5061029c600f5481565b34801561062d57600080fd5b5061024a61063c366004611b6a565b6112ce565b34801561064d57600080fd5b5061029c61065c366004611b6a565b611369565b60006006546007546106739190611d88565b905090565b6001546001600160a01b031633146106a25760405162461bcd60e51b815260040161024190611cc5565b6002546001600160a01b03828116911614156107005760405162461bcd60e51b815260206004820152601960248201527f63616e206e6f74207377656570207374616b6520746f6b656e000000000000006044820152606401610241565b6003546001600160a01b038281169116141561075e5760405162461bcd60e51b815260206004820152601a60248201527f63616e206e6f742073776565702072657761726420746f6b656e0000000000006044820152606401610241565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b1580156107a057600080fd5b505afa1580156107b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d89190611c0e565b90506107ee6001600160a01b038316338361144a565b6040518181526001600160a01b0383169033907f9186304ffe50c568e430e57234122976c83522da68345954bb5485cbab3957139060200160405180910390a35050565b600260005414156108555760405162461bcd60e51b815260040161024190611cfa565b60026000908155338152600c6020526040902080548211156108ae5760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b6044820152606401610241565b6108b6611224565b6001810154600b5482546000929168327cb2734119d3b7a9601e1b916108dc9190611d69565b6108e69190611d49565b6108f09190611d88565b9050801561095b5780610901610d96565b101561094f5760405162461bcd60e51b815260206004820152601b60248201527f696e73756666696369656e74207265776172642062616c616e636500000000006044820152606401610241565b61095b338260016114b2565b821561099957815461096e908490611d88565b8255600854610987906001600160a01b0316338561144a565b826005546109959190611d88565b6005555b600b54825468327cb2734119d3b7a9601e1b916109b591611d69565b6109bf9190611d49565b600183015560405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a25050600160005550565b6001546001600160a01b03163314610a2d5760405162461bcd60e51b815260040161024190611cc5565b610a39338260006114b2565b60405181815233907f2d4434bb59801e733e9ce3df40b0c5518861a5fcdeec1906e83e03c755872b429060200160405180910390a250565b6001546001600160a01b03163314610a9b5760405162461bcd60e51b815260040161024190611cc5565b6004819055600f5460408051918252602082018390527f055418cabed8a0ec732dd9b1f84e69d3f33a8f9a70d721b7a6962a00c26a457291015b60405180910390a150565b60026000541415610b035760405162461bcd60e51b815260040161024190611cfa565b60026000556001600160a01b038116610b5e5760405162461bcd60e51b815260206004820152601e60248201527f43616e2774206465706f73697420666f72206e756c6c206164647265737300006044820152606401610241565b610b68828261160c565b50506001600055565b6001546001600160a01b03163314610b9b5760405162461bcd60e51b815260040161024190611cc5565b610ba56000611894565b565b6000600554610bb4610cf8565b6106739190611d88565b600354600160a01b900460ff1615610c115760405162461bcd60e51b81526020600482015260166024820152752932bbb0b9321034b9903730ba34bb32903a37b5b2b760511b6044820152606401610241565b60008111610c6f5760405162461bcd60e51b815260206004820152602560248201527f4465706f7369742076616c7565206d757374206265206772656174657220746860448201526430b710181760d91b6064820152608401610241565b600354610c87906001600160a01b03163330846118e6565b6040518181527f754fe3a3c69256b66ca56365fda4bbf3299d7c94038c105ffd43fb4b37f56db690602001610ad5565b6000600f548211610cd357610ccc8383611d88565b9050610cf2565b600f548310610ce457506000610cf2565b82600f54610ccc9190611d88565b92915050565b6003546002546000916001600160a01b0391821691161415610d1b575060055490565b6002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015610d5e57600080fd5b505afa158015610d72573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106739190611c0e565b600354600090600160a01b900460ff1615610db057504790565b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610df457600080fd5b505afa158015610e08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2c9190611c0e565b6003546002549192506001600160a01b0391821691161415610e5b57600554610e559082611d88565b91505090565b919050565b60026000541415610e835760405162461bcd60e51b815260040161024190611cfa565b6002600055610e92813361160c565b506001600055565b6001546001600160a01b03163314610ec45760405162461bcd60e51b815260040161024190611cc5565b6000610ece610ba7565b600254909150610ee8906001600160a01b0316838361144a565b816001600160a01b03167feb4e6a6a8d3c8edbd6ef48316a3670cfa0e6374eebe3f555e620399f866d2f3282604051610f2391815260200190565b60405180910390a25050565b600154600160a81b900460ff1680610f515750600154600160a01b900460ff16155b610fb45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610241565b600154600160a81b900460ff16158015610fde576001805461ffff60a01b191661010160a01b1790555b6001600160a01b038516611000576003805460ff60a01b1916600160a01b1790555b600280546001600160a01b038089166001600160a01b03199283168117909355600380549189169183169190911790556004869055600e859055600f849055604080516080810182528381526103e86020820181905291810187905260006060909101819052600880549093169093179091556009819055600a859055600b91909155600d55801561109a576001805460ff60a81b191690555b505050505050565b600260005414156110c55760405162461bcd60e51b815260040161024190611cfa565b6002600090815533808252600c6020526040909120805460085491926110f4926001600160a01b03169161144a565b80546005546111039190611d88565b60055560008082556001820181905560405190815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2506001600055565b6001546001600160a01b031633146111795760405162461bcd60e51b815260040161024190611cc5565b4281116111e55760405162461bcd60e51b815260206004820152603460248201527f6e657720626f6e757320656e642074696d657374616d70206d7573742062652060448201527319dc99585d195c881d1a185b8818dd5c9c995b9d60621b6064820152608401610241565b600f8190556004546040805183815260208101929092527f055418cabed8a0ec732dd9b1f84e69d3f33a8f9a70d721b7a6962a00c26a45729101610ad5565b600a54421161122f57565b60055461123c5742600a55565b600061124d60086002015442610cb7565b600d546009546004549293506000926112669085611d69565b6112709190611d69565b61127a9190611d49565b9050806007600082825461128e9190611d31565b90915550506005546112ac8268327cb2734119d3b7a9601e1b611d69565b6112b69190611d49565b600b546112c39190611d31565b600b55505042600a55565b6001546001600160a01b031633146112f85760405162461bcd60e51b815260040161024190611cc5565b6001600160a01b03811661135d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610241565b61136681611894565b50565b6001600160a01b0381166000908152600c60205260408120600b54600a5442118015611396575060055415155b1561140e5760006113ac60086002015442610cb7565b600d546009546004549293506000926113c59085611d69565b6113cf9190611d69565b6113d99190611d49565b6005549091506113f58268327cb2734119d3b7a9601e1b611d69565b6113ff9190611d49565b6114099084611d31565b925050505b6001820154825468327cb2734119d3b7a9601e1b9061142e908490611d69565b6114389190611d49565b6114429190611d88565b949350505050565b6040516001600160a01b0383166024820152604481018290526114ad90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261191e565b505050565b6114ba610d96565b8211156115095760405162461bcd60e51b815260206004820152601760248201527f6e6f7420656e6f7567682072657761726420746f6b656e0000000000000000006044820152606401610241565b80156115275781600660008282546115219190611d31565b90915550505b600354600160a01b900460ff16156115f5576000836001600160a01b03166159d884604051600060405180830381858888f193505050503d806000811461158a576040519150601f19603f3d011682016040523d82523d6000602084013e61158f565b606091505b50509050806115ef5760405162461bcd60e51b815260206004820152602660248201527f5472616e7366657248656c7065723a204e41544956455f5452414e534645525f60448201526511905253115160d21b6064820152608401610241565b50505050565b6003546114ad906001600160a01b0316848461144a565b6001600160a01b0381166000908152600c6020526040902061162c611224565b8054156116da576001810154600b5482546000929168327cb2734119d3b7a9601e1b916116599190611d69565b6116639190611d49565b61166d9190611d88565b905080156116d8578061167e610d96565b10156116cc5760405162461bcd60e51b815260206004820152601b60248201527f696e73756666696369656e74207265776172642062616c616e636500000000006044820152606401610241565b6116d8838260016114b2565b505b60008315611823576002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561172657600080fd5b505afa15801561173a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061175e9190611c0e565b600854909150611779906001600160a01b03163330886118e6565b6002546040516370a0823160e01b815230600482015282916001600160a01b0316906370a082319060240160206040518083038186803b1580156117bc57600080fd5b505afa1580156117d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f49190611c0e565b6117fe9190611d88565b835490925061180e908390611d31565b835560055461181e908390611d31565b600555505b600b54825468327cb2734119d3b7a9601e1b9161183f91611d69565b6118499190611d49565b60018301556040518181526001600160a01b0384169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f629060200160405180910390a350505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526115ef9085906323b872dd60e01b90608401611476565b6000611973826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119f09092919063ffffffff16565b8051909150156114ad57808060200190518101906119919190611b86565b6114ad5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610241565b60606119ff8484600085611a09565b90505b9392505050565b606082471015611a6a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610241565b843b611ab85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610241565b600080866001600160a01b03168587604051611ad49190611c76565b60006040518083038185875af1925050503d8060008114611b11576040519150601f19603f3d011682016040523d82523d6000602084013e611b16565b606091505b5091509150611b26828286611b31565b979650505050505050565b60608315611b40575081611a02565b825115611b505782518084602001fd5b8160405162461bcd60e51b81526004016102419190611c92565b600060208284031215611b7b578081fd5b8135611a0281611de1565b600060208284031215611b97578081fd5b81518015158114611a02578182fd5b600080600080600060a08688031215611bbd578081fd5b8535611bc881611de1565b94506020860135611bd881611de1565b94979496505050506040830135926060810135926080909101359150565b600060208284031215611c07578081fd5b5035919050565b600060208284031215611c1f578081fd5b5051919050565b60008060408385031215611c38578182fd5b823591506020830135611c4a81611de1565b809150509250929050565b60008060408385031215611c67578182fd5b50508035926020909101359150565b60008251611c88818460208701611d9f565b9190910192915050565b6020815260008251806020840152611cb1816040850160208701611d9f565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115611d4457611d44611dcb565b500190565b600082611d6457634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611d8357611d83611dcb565b500290565b600082821015611d9a57611d9a611dcb565b500390565b60005b83811015611dba578181015183820152602001611da2565b838111156115ef5750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461136657600080fdfea2646970667358221220e31cb3d85b2acd3d7e216fbc915425f62fd7b30315cb937ee867d5ea81e0c6fa64736f6c63430008040033a2646970667358221220540e79eb2df1ef55020e1228144e6d68e6af801a3f3ba0ebe3370422803de5e564736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006c905b4108a87499ced1e0498721f2b831c6ab13
-----Decoded View---------------
Arg [0] : _defaultOwner (address): 0x6c905b4108A87499CEd1E0498721F2B831c6Ab13
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000006c905b4108a87499ced1e0498721f2b831c6ab13
Deployed Bytecode Sourcemap
241:2626:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1788:585;;;;;;:::i;:::-;;:::i;:::-;;286:27;;;;;-1:-1:-1;;;;;286:27:1;;;;;;-1:-1:-1;;;;;2191:32:10;;;2173:51;;2161:2;2146:18;286:27:1;;;;;;;;2379:366;;;;;;:::i;:::-;;:::i;:::-;;;;4336:25:10;;;4392:2;4377:18;;4370:34;;;;4309:18;2379:366:1;4291:119:10;2751:113:1;;;;;;:::i;:::-;;:::i;1605:92:3:-;;;:::i;973:85::-;1019:7;1045:6;-1:-1:-1;;;;;1045:6:3;973:85;;645:401:1;;;;;;:::i;:::-;;:::i;1052:730::-;;;;;;:::i;:::-;;:::i;1846:189:3:-;;;;;;:::i;:::-;;:::i;1788:585:1:-;2022:23;2047:20;2071:107;2101:13;2128:10;2152:16;2071;:107::i;:::-;2021:157;;;;2188:178;2220:11;2245:12;2271:15;2300:10;2324:12;2350:6;2188:18;:178::i;:::-;1788:585;;;;;;;;:::o;2379:366::-;2525:24;;2602:32;2618:16;2602:13;:32;:::i;:::-;2583:51;-1:-1:-1;2659:29:1;2672:16;2659:10;:29;:::i;:::-;2644:44;;2379:366;;;;;;:::o;2751:113::-;1019:7:3;1045:6;-1:-1:-1;;;;;1045:6:3;666:10:9;1185:23:3;1177:68;;;;-1:-1:-1;;;1177:68:3;;;;;;;:::i;:::-;;;;;;;;;2829:12:1::1;:28:::0;;-1:-1:-1;;;;;;2829:28:1::1;-1:-1:-1::0;;;;;2829:28:1;;;::::1;::::0;;;::::1;::::0;;2751:113::o;1605:92:3:-;1019:7;1045:6;-1:-1:-1;;;;;1045:6:3;666:10:9;1185:23:3;1177:68;;;;-1:-1:-1;;;1177:68:3;;;;;;;:::i;:::-;1669:21:::1;1687:1;1669:9;:21::i;:::-;1605:92::o:0;645:401:1:-;1017:12;;853:186;;885:11;;910:12;;936:16;;966:10;;990:13;;-1:-1:-1;;;;;1017:12:1;853:18;:186::i;:::-;645:401;;;;;:::o;1052:730::-;1277:21;1301:22;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1334:157:1;;-1:-1:-1;;;1334:157:1;;-1:-1:-1;;;;;3185:15:10;;;1334:157:1;;;3167:34:10;3237:15;;;3217:18;;;3210:43;3269:18;;;3262:34;;;3312:18;;;3305:34;;;3355:19;;;3348:35;;;1277:46:1;;-1:-1:-1;1334:15:1;;;;;;3101:19:10;;1334:157:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1502:30:1;;-1:-1:-1;;;1502:30:1;;-1:-1:-1;;;;;2191:32:10;;;1502:30:1;;;2173:51:10;1502:22:1;;;-1:-1:-1;1502:22:1;;-1:-1:-1;2146:18:10;;1502:30:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1548:227:1;;;-1:-1:-1;;;;;2578:15:10;;;2560:34;;2630:15;;;2625:2;2610:18;;2603:43;2662:18;;;2655:34;;;2720:2;2705:18;;2698:34;;;2763:3;2748:19;;2741:35;;;2813:15;;;2540:3;2792:19;;2785:44;1548:227:1;;;;-1:-1:-1;1548:227:1;;-1:-1:-1;2509:3:10;2494:19;1548:227:1;;;;;;;1052:730;;;;;;;:::o;1846:189:3:-;1019:7;1045:6;-1:-1:-1;;;;;1045:6:3;666:10:9;1185:23:3;1177:68;;;;-1:-1:-1;;;1177:68:3;;;;;;;:::i;:::-;-1:-1:-1;;;;;1934:22:3;::::1;1926:73;;;::::0;-1:-1:-1;;;1926:73:3;;3596:2:10;1926:73:3::1;::::0;::::1;3578:21:10::0;3635:2;3615:18;;;3608:30;3674:34;3654:18;;;3647:62;-1:-1:-1;;;3725:18:10;;;3718:36;3771:19;;1926:73:3::1;3568:228:10::0;1926:73:3::1;2009:19;2019:8;2009:9;:19::i;:::-;1846:189:::0;:::o;2041:169::-;2096:16;2115:6;;-1:-1:-1;;;;;2131:17:3;;;-1:-1:-1;;;;;;2131:17:3;;;;;;2163:40;;2115:6;;;;;;;2163:40;;2096:16;2163:40;2041:169;;:::o;-1:-1:-1:-;;;;;;;;:::o;14:257:10:-;73:6;126:2;114:9;105:7;101:23;97:32;94:2;;;147:6;139;132:22;94:2;191:9;178:23;210:31;235:5;210:31;:::i;:::-;260:5;84:187;-1:-1:-1;;;84:187:10:o;276:634::-;401:6;409;417;425;433;486:3;474:9;465:7;461:23;457:33;454:2;;;508:6;500;493:22;454:2;552:9;539:23;571:31;596:5;571:31;:::i;:::-;621:5;-1:-1:-1;678:2:10;663:18;;650:32;691:33;650:32;691:33;:::i;:::-;444:466;;743:7;;-1:-1:-1;;;;797:2:10;782:18;;769:32;;848:2;833:18;;820:32;;899:3;884:19;;;871:33;;-1:-1:-1;444:466:10:o;915:776::-;1049:6;1057;1065;1073;1081;1089;1142:3;1130:9;1121:7;1117:23;1113:33;1110:2;;;1164:6;1156;1149:22;1110:2;1208:9;1195:23;1227:31;1252:5;1227:31;:::i;:::-;1277:5;-1:-1:-1;1334:2:10;1319:18;;1306:32;1347:33;1306:32;1347:33;:::i;:::-;1399:7;-1:-1:-1;1453:2:10;1438:18;;1425:32;;-1:-1:-1;1504:2:10;1489:18;;1476:32;;-1:-1:-1;1555:3:10;1540:19;;1527:33;;-1:-1:-1;1612:3:10;1597:19;;1584:33;1626;1584;1626;:::i;:::-;1678:7;1668:17;;;1100:591;;;;;;;;:::o;1696:326::-;1773:6;1781;1789;1842:2;1830:9;1821:7;1817:23;1813:32;1810:2;;;1863:6;1855;1848:22;1810:2;-1:-1:-1;;1891:23:10;;;1961:2;1946:18;;1933:32;;-1:-1:-1;2012:2:10;1997:18;;;1984:32;;1800:222;-1:-1:-1;1800:222:10:o;3801:356::-;4003:2;3985:21;;;4022:18;;;4015:30;4081:34;4076:2;4061:18;;4054:62;4148:2;4133:18;;3975:182::o;4415:229::-;4455:3;4486:1;4482:6;4479:1;4476:13;4473:2;;;-1:-1:-1;;;4512:33:10;;4568:4;4565:1;4558:15;4598:4;4519:3;4586:17;4473:2;-1:-1:-1;4629:9:10;;4463:181::o;4649:217::-;4689:1;4715;4705:2;;-1:-1:-1;;;4740:31:10;;4794:4;4791:1;4784:15;4822:4;4747:1;4812:15;4705:2;-1:-1:-1;4851:9:10;;4695:171::o;4871:131::-;-1:-1:-1;;;;;4946:31:10;;4936:42;;4926:2;;4992:1;4989;4982:12
Swarm Source
ipfs://540e79eb2df1ef55020e1228144e6d68e6af801a3f3ba0ebe3370422803de5e5
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ 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.