More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,936 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Stake | 8643427 | 2 mins ago | IN | 0 S | 0.00744573 | ||||
Stake | 8643225 | 3 mins ago | IN | 0 S | 0.00744639 | ||||
Stake | 8641773 | 12 mins ago | IN | 0 S | 0.01204685 | ||||
Stake | 8641062 | 16 mins ago | IN | 0 S | 0.00571257 | ||||
Stake | 8640905 | 17 mins ago | IN | 0 S | 0.00600538 | ||||
Stake | 8640274 | 21 mins ago | IN | 0 S | 0.00822724 | ||||
Claim Reward | 8639684 | 24 mins ago | IN | 0 S | 0.00579132 | ||||
Stake | 8637094 | 40 mins ago | IN | 0 S | 0.00600647 | ||||
Claim Reward | 8636647 | 43 mins ago | IN | 0 S | 0.00576746 | ||||
Stake | 8636494 | 44 mins ago | IN | 0 S | 0.00963923 | ||||
Stake | 8635325 | 51 mins ago | IN | 0 S | 0.00571323 | ||||
Claim Reward | 8634337 | 57 mins ago | IN | 0 S | 0.00576746 | ||||
Stake | 8634164 | 58 mins ago | IN | 0 S | 0.00917273 | ||||
Claim Reward | 8632360 | 1 hr ago | IN | 0 S | 0.00552635 | ||||
Claim Reward | 8630942 | 1 hr ago | IN | 0 S | 0.00611166 | ||||
Stake | 8629533 | 1 hr ago | IN | 0 S | 0.00600538 | ||||
Claim Reward | 8629342 | 1 hr ago | IN | 0 S | 0.00611166 | ||||
Stake | 8629096 | 1 hr ago | IN | 0 S | 0.00571389 | ||||
Exit | 8628069 | 1 hr ago | IN | 0 S | 0.00973461 | ||||
Claim Reward | 8627469 | 1 hr ago | IN | 0 S | 0.00611166 | ||||
Claim Reward | 8626782 | 1 hr ago | IN | 0 S | 0.00576746 | ||||
Stake | 8622895 | 2 hrs ago | IN | 0 S | 0.00600429 | ||||
Claim Reward | 8622501 | 2 hrs ago | IN | 0 S | 0.00512396 | ||||
Claim Reward | 8622501 | 2 hrs ago | IN | 0 S | 0.00512303 | ||||
Claim Reward | 8622249 | 2 hrs ago | IN | 0 S | 0.00482696 |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
Masonry
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./utils/ContractGuard.sol"; import "./interfaces/IBasisAsset.sol"; import "./interfaces/ITreasury.sol"; import "./owner/Operator.sol"; contract ShareWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public share; uint256 private _totalSupply; mapping(address => uint256) private _balances; function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function stake(uint256 amount) public virtual { _totalSupply = _totalSupply.add(amount); _balances[msg.sender] = _balances[msg.sender].add(amount); share.safeTransferFrom(msg.sender, address(this), amount); } function withdraw(uint256 amount) public virtual { uint256 masonUserShare = _balances[msg.sender]; require(masonUserShare >= amount, "Masonry: withdraw request greater than staked amount"); _totalSupply = _totalSupply.sub(amount); _balances[msg.sender] = masonUserShare.sub(amount); share.safeTransfer(msg.sender, amount); } } /* __________ .___ ___________.__ \______ \_____ ______ ____ __| _/ \_ _____/|__| ____ _____ ____ ____ ____ | | _/\__ \ / ___/_/ __ \ / __ | | __) | | / \ \__ \ / \ _/ ___\_/ __ \ | | \ / __ \_ \___ \ \ ___/ / /_/ | | \ | || | \ / __ \_| | \\ \___\ ___/ |______ /(____ //____ > \___ >\____ | \___ / |__||___| /(____ /|___| / \___ >\___ > \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ */ contract Masonry is ShareWrapper, ContractGuard, Operator { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; /* ========== DATA STRUCTURES ========== */ struct MasonSeat { uint256 lastSnapshotIndex; uint256 rewardEarned; uint256 epochTimerStart; } struct MasonrySnapshot { uint256 time; uint256 rewardReceived; uint256 rewardPerShare; } /* ========== STATE VARIABLES ========== */ // flags bool public initialized = false; IERC20 public snake; ITreasury public treasury; mapping(address => MasonSeat) public masons; MasonrySnapshot[] public masonryHistory; uint256 public withdrawLockupEpochs; uint256 public rewardLockupEpochs; uint256 public claimRewardsBurnEpochs; /* ========== EVENTS ========== */ event Initialized(address indexed executor, uint256 at); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event RewardAdded(address indexed user, uint256 reward); /* ========== Modifiers =============== */ modifier masonUserExists { require(balanceOf(msg.sender) > 0, "Masonry: The masonUser does not exist"); _; } modifier updateReward(address masonUser) { if (masonUser != address(0)) { MasonSeat memory seat = masons[masonUser]; seat.rewardEarned = earned(masonUser); seat.lastSnapshotIndex = latestSnapshotIndex(); masons[masonUser] = seat; } _; } modifier notInitialized { require(!initialized, "Masonry: already initialized"); _; } /* ========== GOVERNANCE ========== */ function initialize( IERC20 _snake, IERC20 _share, ITreasury _treasury ) public notInitialized onlyOperator { snake = _snake; share = _share; treasury = _treasury; MasonrySnapshot memory genesisSnapshot = MasonrySnapshot({time : block.number, rewardReceived : 0, rewardPerShare : 0}); masonryHistory.push(genesisSnapshot); withdrawLockupEpochs = 4; // Lock for 4 epochs (24h) before release withdraw rewardLockupEpochs = 2; // Lock for 2 epochs (12h) before release claimReward claimRewardsBurnEpochs = 8; // if the masonUser doesn't claim rewards in 2 days, the rewards will be burned initialized = true; emit Initialized(msg.sender, block.number); } function setOperator(address _operator) external onlyOperator { transferOperator(_operator); } function renounceOperator() external onlyOperator { _renounceOperator(); } function setLockUp(uint256 _withdrawLockupEpochs, uint256 _rewardLockupEpochs, uint256 _claimRewardsBurnEpochs) external onlyOperator { require(_withdrawLockupEpochs >= _rewardLockupEpochs && _withdrawLockupEpochs <= 56 && _claimRewardsBurnEpochs <= 56, "_withdrawLockupEpochs: out of range"); // <= 2 week require(_withdrawLockupEpochs > 0 && _rewardLockupEpochs > 0 && _claimRewardsBurnEpochs > 0, "lockupEpochs must be greater than 0"); withdrawLockupEpochs = _withdrawLockupEpochs; rewardLockupEpochs = _rewardLockupEpochs; claimRewardsBurnEpochs = _claimRewardsBurnEpochs; } /* ========== VIEW FUNCTIONS ========== */ // =========== Snapshot getters =========== // function latestSnapshotIndex() public view returns (uint256) { return masonryHistory.length.sub(1); } function getLatestSnapshot() internal view returns (MasonrySnapshot memory) { return masonryHistory[latestSnapshotIndex()]; } function getLastSnapshotIndexOf(address masonUser) public view returns (uint256) { return masons[masonUser].lastSnapshotIndex; } function getLastSnapshotOf(address masonUser) internal view returns (MasonrySnapshot memory) { return masonryHistory[getLastSnapshotIndexOf(masonUser)]; } function canWithdraw(address masonUser) external view returns (bool) { return masons[masonUser].epochTimerStart.add(withdrawLockupEpochs) <= treasury.epoch(); } function canClaimReward(address masonUser) external view returns (bool) { return masons[masonUser].epochTimerStart.add(rewardLockupEpochs) <= treasury.epoch(); } function rewardsWillBeBurned(address masonUser) external view returns (bool) { return masons[masonUser].epochTimerStart.add(claimRewardsBurnEpochs) <= treasury.epoch(); // if the masonUser doesn't claim rewards in 2 weeks, the rewards will be burned } function epoch() external view returns (uint256) { return treasury.epoch(); } function nextEpochPoint() external view returns (uint256) { return treasury.nextEpochPoint(); } function getSnakePrice() external view returns (uint256) { return treasury.getSnakePrice(); } // =========== Users getters =========== // function rewardPerShare() public view returns (uint256) { return getLatestSnapshot().rewardPerShare; } function earned(address masonUser) public view returns (uint256) { uint256 latestRPS = getLatestSnapshot().rewardPerShare; uint256 storedRPS = getLastSnapshotOf(masonUser).rewardPerShare; return balanceOf(masonUser).mul(latestRPS.sub(storedRPS)).div(1e18).add(masons[masonUser].rewardEarned); } /* ========== MUTATIVE FUNCTIONS ========== */ function stake(uint256 amount) public override onlyOneBlock updateReward(msg.sender) { require(amount > 0, "Masonry: Cannot stake 0"); super.stake(amount); masons[msg.sender].epochTimerStart = treasury.epoch(); // reset timer emit Staked(msg.sender, amount); } function withdraw(uint256 amount) public override onlyOneBlock masonUserExists updateReward(msg.sender) { require(amount > 0, "Masonry: Cannot withdraw 0"); require(masons[msg.sender].epochTimerStart.add(withdrawLockupEpochs) <= treasury.epoch(), "Masonry: still in withdraw lockup"); claimReward(); super.withdraw(amount); emit Withdrawn(msg.sender, amount); } function exit() external { withdraw(balanceOf(msg.sender)); } function claimReward() public updateReward(msg.sender) { uint256 reward = masons[msg.sender].rewardEarned; if (reward > 0) { require(masons[msg.sender].epochTimerStart.add(rewardLockupEpochs) <= treasury.epoch(), "Masonry: still in reward lockup"); bool willBurn = masons[msg.sender].epochTimerStart.add(claimRewardsBurnEpochs) <= treasury.epoch(); masons[msg.sender].epochTimerStart = treasury.epoch(); // reset timer masons[msg.sender].rewardEarned = 0; if (willBurn) { IBasisAsset(address(snake)).burn(reward); emit RewardPaid(msg.sender, 0); } else { snake.safeTransfer(msg.sender, reward); emit RewardPaid(msg.sender, reward); } } } function allocateSeigniorage(uint256 amount) external onlyOneBlock onlyOperator { require(amount > 0, "Masonry: Cannot allocate 0"); require(totalSupply() > 0, "Masonry: Cannot allocate when totalSupply is 0"); // Create & add new snapshot uint256 prevRPS = getLatestSnapshot().rewardPerShare; uint256 nextRPS = prevRPS.add(amount.mul(1e18).div(totalSupply())); MasonrySnapshot memory newSnapshot = MasonrySnapshot({ time: block.number, rewardReceived: amount, rewardPerShare: nextRPS }); masonryHistory.push(newSnapshot); snake.safeTransferFrom(msg.sender, address(this), amount); emit RewardAdded(msg.sender, amount); } function governanceRecoverUnsupported(IERC20 _token, uint256 _amount, address _to) external onlyOperator { // do not allow to drain core tokens require(address(_token) != address(snake), "snake"); require(address(_token) != address(share), "share"); _token.safeTransfer(_to, _amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.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; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(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)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(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"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library 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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IBasisAsset { function mint(address recipient, uint256 amount) external returns (bool); function burn(uint256 amount) external; function burnFrom(address from, uint256 amount) external; function isOperator() external returns (bool); function operator() external view returns (address); function transferOperator(address newOperator_) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ITreasury { function epoch() external view returns (uint256); function nextEpochPoint() external view returns (uint256); function getSnakePrice() external view returns (uint256); function buyBonds(uint256 amount, uint256 targetPrice) external; function redeemBonds(uint256 amount, uint256 targetPrice) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Operator is Context, Ownable { address private _operator; event OperatorTransferred(address indexed previousOperator, address indexed newOperator); constructor() { _operator = _msgSender(); emit OperatorTransferred(address(0), _operator); } function operator() public view returns (address) { return _operator; } modifier onlyOperator() { require(_operator == msg.sender, "operator: caller is not the operator"); _; } function isOperator() public view returns (bool) { return _msgSender() == _operator; } function transferOperator(address newOperator_) public onlyOwner { _transferOperator(newOperator_); } function _transferOperator(address newOperator_) internal { require(newOperator_ != address(0), "operator: zero address given for new operator"); emit OperatorTransferred(address(0), newOperator_); _operator = newOperator_; } function _renounceOperator() public onlyOwner { emit OperatorTransferred(_operator, address(0)); _operator = address(0); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract ContractGuard { mapping(uint256 => mapping(address => bool)) private _status; function checkSameOriginReentranted() internal view returns (bool) { return _status[block.number][tx.origin]; } function checkSameSenderReentranted() internal view returns (bool) { return _status[block.number][msg.sender]; } modifier onlyOneBlock() { require(!checkSameOriginReentranted(), "ContractGuard: one block, one function"); require(!checkSameSenderReentranted(), "ContractGuard: one block, one function"); _; _status[block.number][tx.origin] = true; _status[block.number][msg.sender] = true; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"uint256","name":"at","type":"uint256"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOperator","type":"address"},{"indexed":true,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"_renounceOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allocateSeigniorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masonUser","type":"address"}],"name":"canClaimReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masonUser","type":"address"}],"name":"canWithdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimRewardsBurnEpochs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masonUser","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"masonUser","type":"address"}],"name":"getLastSnapshotIndexOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSnakePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_snake","type":"address"},{"internalType":"contract IERC20","name":"_share","type":"address"},{"internalType":"contract ITreasury","name":"_treasury","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestSnapshotIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"masonryHistory","outputs":[{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"rewardReceived","type":"uint256"},{"internalType":"uint256","name":"rewardPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"masons","outputs":[{"internalType":"uint256","name":"lastSnapshotIndex","type":"uint256"},{"internalType":"uint256","name":"rewardEarned","type":"uint256"},{"internalType":"uint256","name":"epochTimerStart","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextEpochPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardLockupEpochs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masonUser","type":"address"}],"name":"rewardsWillBeBurned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawLockupEpochs","type":"uint256"},{"internalType":"uint256","name":"_rewardLockupEpochs","type":"uint256"},{"internalType":"uint256","name":"_claimRewardsBurnEpochs","type":"uint256"}],"name":"setLockUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"share","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"snake","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOperator_","type":"address"}],"name":"transferOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"contract ITreasury","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawLockupEpochs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526005805460ff60a01b19169055348015601c57600080fd5b506024336068565b600580546001600160a01b031916339081179091556040516000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a360ba565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61230e806100c96000396000f3fe608060405234801561001057600080fd5b50600436106102315760003560e01c8063714b465811610130578063a8d5fd65116100b8578063ceccf59a1161007c578063ceccf59a146104a5578063d7112f4f146104b8578063e0f6dc9e146104c0578063e9fad8ee146104ef578063f2fde38b146104f757600080fd5b8063a8d5fd651461045c578063b3ab15fb1461046f578063b88a802f14610482578063c0c53b8b1461048a578063c5967c261461049d57600080fd5b80638da5cb5b116100ff5780638da5cb5b14610414578063900cf0cf1461042557806397ffe1d71461042d578063a694fc3a14610440578063a894a1ee1461045357600080fd5b8063714b4658146103ad578063715018a6146103d65780638a27f103146103de5780638cd9a27f146103e657600080fd5b80632ab6f8db116101be57806354575af41161018257806354575af414610326578063570ca7351461033957806361d027b31461035e5780636a6adeb31461037157806370a082311461038457600080fd5b80632ab6f8db146102e85780632e1a7d4d146102f05780633f9e3f04146103035780634456eda21461030b578063446a2ec81461031e57600080fd5b8063158ef93e11610205578063158ef93e1461029b57806318160ddd146102af57806319262d30146102b75780631e85cd65146102ca57806329605e77146102d357600080fd5b80628cc26214610236578063022ba18d1461025c578063046335d0146102655780630666798a14610288575b600080fd5b61024961024436600461202a565b61050a565b6040519081526020015b60405180910390f35b610249600b5481565b61027861027336600461202a565b61059b565b6040519015158152602001610253565b61027861029636600461202a565b610639565b60055461027890600160a01b900460ff1681565b600154610249565b6102786102c536600461202a565b6106cf565b610249600a5481565b6102e66102e136600461202a565b610765565b005b6102e6610779565b6102e66102fe36600461204e565b6107b6565b610249610aec565b6005546001600160a01b03163314610278565b610249610b02565b6102e6610334366004612067565b610b15565b6005546001600160a01b03165b6040516001600160a01b039091168152602001610253565b600754610346906001600160a01b031681565b600654610346906001600160a01b031681565b61024961039236600461202a565b6001600160a01b031660009081526002602052604090205490565b6102496103bb36600461202a565b6001600160a01b031660009081526008602052604090205490565b6102e6610be4565b6102e6610bf6565b6103f96103f436600461204e565b610c48565b60408051938452602084019290925290820152606001610253565b6004546001600160a01b0316610346565b610249610c7b565b6102e661043b36600461204e565b610ce9565b6102e661044e36600461204e565b610fb9565b610249600c5481565b600054610346906001600160a01b031681565b6102e661047d36600461202a565b6111d9565b6102e661120c565b6102e66104983660046120a9565b6115ac565b61024961176d565b6102e66104b33660046120e9565b6117b7565b6102496118d9565b6103f96104ce36600461202a565b60086020526000908152604090208054600182015460029092015490919083565b6102e6611923565b6102e661050536600461202a565b61193c565b6000806105156119b2565b604001519050600061052684611a2c565b6040908101516001600160a01b0386166000908152600860205291909120600101549091506105939061058d670de0b6b3a76400006105876105688787611abf565b6001600160a01b038a1660009081526002602052604090205490611ad4565b90611ae0565b90611aec565b949350505050565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa1580156105e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106099190612115565b600b546001600160a01b03841660009081526008602052604090206002015461063191611aec565b111592915050565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015610683573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a79190612115565b600c546001600160a01b03841660009081526008602052604090206002015461063191611aec565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015610719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073d9190612115565b600a546001600160a01b03841660009081526008602052604090206002015461063191611aec565b61076d611af8565b61077681611b52565b50565b6005546001600160a01b031633146107ac5760405162461bcd60e51b81526004016107a39061212e565b60405180910390fd5b6107b4610bf6565b565b43600090815260036020908152604080832032845290915290205460ff16156107f15760405162461bcd60e51b81526004016107a390612172565b43600090815260036020908152604080832033845290915290205460ff161561082c5760405162461bcd60e51b81526004016107a390612172565b33600090815260026020526040812054116108975760405162461bcd60e51b815260206004820152602560248201527f4d61736f6e72793a20546865206d61736f6e5573657220646f6573206e6f7420604482015264195e1a5cdd60da1b60648201526084016107a3565b338015610928576001600160a01b03811660009081526008602090815260409182902082516060810184528154815260018201549281019290925260020154918101919091526108e68261050a565b60208201526108f3610aec565b81526001600160a01b038216600090815260086020908152604091829020835181559083015160018201559101516002909101555b600082116109785760405162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f74207769746864726177203000000000000060448201526064016107a3565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ef9190612115565b600a5433600090815260086020526040902060020154610a0e91611aec565b1115610a665760405162461bcd60e51b815260206004820152602160248201527f4d61736f6e72793a207374696c6c20696e207769746864726177206c6f636b756044820152600760fc1b60648201526084016107a3565b610a6e61120c565b610a7782611c16565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250504360009081526003602090815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b600954600090610afd906001611abf565b905090565b6000610b0c6119b2565b60400151905090565b6005546001600160a01b03163314610b3f5760405162461bcd60e51b81526004016107a39061212e565b6006546001600160a01b0390811690841603610b855760405162461bcd60e51b8152602060048201526005602482015264736e616b6560d81b60448201526064016107a3565b6000546001600160a01b0390811690841603610bcb5760405162461bcd60e51b8152602060048201526005602482015264736861726560d81b60448201526064016107a3565b610bdf6001600160a01b0384168284611cd4565b505050565b610bec611af8565b6107b46000611d37565b610bfe611af8565b6005546040516000916001600160a01b0316907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908390a3600580546001600160a01b0319169055565b60098181548110610c5857600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015610cc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afd9190612115565b43600090815260036020908152604080832032845290915290205460ff1615610d245760405162461bcd60e51b81526004016107a390612172565b43600090815260036020908152604080832033845290915290205460ff1615610d5f5760405162461bcd60e51b81526004016107a390612172565b6005546001600160a01b03163314610d895760405162461bcd60e51b81526004016107a39061212e565b60008111610dd95760405162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f63617465203000000000000060448201526064016107a3565b6000610de460015490565b11610e485760405162461bcd60e51b815260206004820152602e60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f63617465207768656e20746f60448201526d074616c537570706c7920697320360941b60648201526084016107a3565b6000610e526119b2565b6040015190506000610e82610e7b610e6960015490565b61058786670de0b6b3a7640000611ad4565b8390611aec565b60408051606081018252438152602081018681529181018381526009805460018101825560009190915282517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af60039092029182015592517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0840155517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b19092019190915560065491925090610f43906001600160a01b0316333087611d89565b60405184815233907fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e299060200160405180910390a250504360009081526003602090815260408083203284529091528082208054600160ff19918216811790925533845291909220805490911690911790555050565b43600090815260036020908152604080832032845290915290205460ff1615610ff45760405162461bcd60e51b81526004016107a390612172565b43600090815260036020908152604080832033845290915290205460ff161561102f5760405162461bcd60e51b81526004016107a390612172565b3380156110c0576001600160a01b038116600090815260086020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261107e8261050a565b602082015261108b610aec565b81526001600160a01b038216600090815260086020908152604091829020835181559083015160018201559101516002909101555b600082116111105760405162461bcd60e51b815260206004820152601760248201527f4d61736f6e72793a2043616e6e6f74207374616b65203000000000000000000060448201526064016107a3565b61111982611dc7565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561116c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111909190612115565b33600081815260086020526040908190206002019290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610aa59085815260200190565b6005546001600160a01b031633146112035760405162461bcd60e51b81526004016107a39061212e565b61077681610765565b33801561129d576001600160a01b038116600090815260086020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261125b8261050a565b6020820152611268610aec565b81526001600160a01b038216600090815260086020908152604091829020835181559083015160018201559101516002909101555b3360009081526008602052604090206001015480156115a857600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132d9190612115565b600b543360009081526008602052604090206002015461134c91611aec565b111561139a5760405162461bcd60e51b815260206004820152601f60248201527f4d61736f6e72793a207374696c6c20696e20726577617264206c6f636b75700060448201526064016107a3565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa1580156113e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114089190612115565b600c543360009081526008602052604090206002015461142791611aec565b11159050600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561147e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a29190612115565b3360009081526008602052604081206002810192909255600190910155801561155f57600654604051630852cd8d60e31b8152600481018490526001600160a01b03909116906342966c6890602401600060405180830381600087803b15801561150b57600080fd5b505af115801561151f573d6000803e3d6000fd5b5050604051600081523392507fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048691506020015b60405180910390a2505050565b600654611576906001600160a01b03163384611cd4565b60405182815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048690602001611552565b5050565b600554600160a01b900460ff16156116065760405162461bcd60e51b815260206004820152601c60248201527f4d61736f6e72793a20616c726561647920696e697469616c697a65640000000060448201526064016107a3565b6005546001600160a01b031633146116305760405162461bcd60e51b81526004016107a39061212e565b600680546001600160a01b038581166001600160a01b03199283161790925560008054858416908316178155600780549385169390921692909217905560408051606081018252438082526020808301858152838501868152600980546001810182559752845160039097027f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af81019790975590517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0870155517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b1909501949094556004600a556002600b556008600c556005805460ff60a01b1916600160a01b17905591519182529133917f25ff68dd81b34665b5ba7e553ee5511bf6812e12adb4a7e2c0d9e26b3099ce79910160405180910390a250505050565b600754604080516362cb3e1360e11b815290516000926001600160a01b03169163c5967c269160048083019260209291908290030181865afa158015610cc5573d6000803e3d6000fd5b6005546001600160a01b031633146117e15760405162461bcd60e51b81526004016107a39061212e565b8183101580156117f2575060388311155b80156117ff575060388111155b6118575760405162461bcd60e51b815260206004820152602360248201527f5f77697468647261774c6f636b757045706f6368733a206f7574206f662072616044820152626e676560e81b60648201526084016107a3565b6000831180156118675750600082115b80156118735750600081115b6118cb5760405162461bcd60e51b815260206004820152602360248201527f6c6f636b757045706f636873206d75737420626520677265617465722074686160448201526206e20360ec1b60648201526084016107a3565b600a92909255600b55600c55565b6007546040805163d7112f4f60e01b815290516000926001600160a01b03169163d7112f4f9160048083019260209291908290030181865afa158015610cc5573d6000803e3d6000fd5b336000908152600260205260409020546107b4906107b6565b611944611af8565b6001600160a01b0381166119a95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107a3565b61077681611d37565b6119d660405180606001604052806000815260200160008152602001600081525090565b60096119e0610aec565b815481106119f0576119f06121b8565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b611a5060405180606001604052806000815260200160008152602001600081525090565b6009611a71836001600160a01b031660009081526008602052604090205490565b81548110611a8157611a816121b8565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509050919050565b6000611acb82846121e4565b90505b92915050565b6000611acb82846121f7565b6000611acb828461220e565b6000611acb8284612230565b6004546001600160a01b031633146107b45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107a3565b6001600160a01b038116611bbe5760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b60648201526084016107a3565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526002602052604090205481811015611c935760405162461bcd60e51b815260206004820152603460248201527f4d61736f6e72793a2077697468647261772072657175657374206772656174656044820152731c881d1a185b881cdd185ad95908185b5bdd5b9d60621b60648201526084016107a3565b600154611ca09083611abf565b600155611cad8183611abf565b3360008181526002602052604081209290925590546115a8916001600160a01b0390911690845b6040516001600160a01b038316602482015260448101829052610bdf90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611e1d565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052611dc19085906323b872dd60e01b90608401611d00565b50505050565b600154611dd49082611aec565b60015533600090815260026020526040902054611df19082611aec565b336000818152600260205260408120929092559054610776916001600160a01b03909116903084611d89565b6000611e72826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ef29092919063ffffffff16565b9050805160001480611e93575080806020019051810190611e939190612243565b610bdf5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016107a3565b6060610593848460008585600080866001600160a01b03168587604051611f199190612289565b60006040518083038185875af1925050503d8060008114611f56576040519150601f19603f3d011682016040523d82523d6000602084013e611f5b565b606091505b5091509150611f6c87838387611f77565b979650505050505050565b60608315611fe6578251600003611fdf576001600160a01b0385163b611fdf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107a3565b5081610593565b6105938383815115611ffb5781518083602001fd5b8060405162461bcd60e51b81526004016107a391906122a5565b6001600160a01b038116811461077657600080fd5b60006020828403121561203c57600080fd5b813561204781612015565b9392505050565b60006020828403121561206057600080fd5b5035919050565b60008060006060848603121561207c57600080fd5b833561208781612015565b925060208401359150604084013561209e81612015565b809150509250925092565b6000806000606084860312156120be57600080fd5b83356120c981612015565b925060208401356120d981612015565b9150604084013561209e81612015565b6000806000606084860312156120fe57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561212757600080fd5b5051919050565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b60208082526026908201527f436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756040820152653731ba34b7b760d11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115611ace57611ace6121ce565b8082028115828204841417611ace57611ace6121ce565b60008261222b57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115611ace57611ace6121ce565b60006020828403121561225557600080fd5b8151801515811461204757600080fd5b60005b83811015612280578181015183820152602001612268565b50506000910152565b6000825161229b818460208701612265565b9190910192915050565b60208152600082518060208401526122c4816040850160208701612265565b601f01601f1916919091016040019291505056fea264697066735822122029ea4fb770bf0b930229a94b4acde1b752c74ae41cd1529df90fe4bd91ab4b7164736f6c634300081a0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102315760003560e01c8063714b465811610130578063a8d5fd65116100b8578063ceccf59a1161007c578063ceccf59a146104a5578063d7112f4f146104b8578063e0f6dc9e146104c0578063e9fad8ee146104ef578063f2fde38b146104f757600080fd5b8063a8d5fd651461045c578063b3ab15fb1461046f578063b88a802f14610482578063c0c53b8b1461048a578063c5967c261461049d57600080fd5b80638da5cb5b116100ff5780638da5cb5b14610414578063900cf0cf1461042557806397ffe1d71461042d578063a694fc3a14610440578063a894a1ee1461045357600080fd5b8063714b4658146103ad578063715018a6146103d65780638a27f103146103de5780638cd9a27f146103e657600080fd5b80632ab6f8db116101be57806354575af41161018257806354575af414610326578063570ca7351461033957806361d027b31461035e5780636a6adeb31461037157806370a082311461038457600080fd5b80632ab6f8db146102e85780632e1a7d4d146102f05780633f9e3f04146103035780634456eda21461030b578063446a2ec81461031e57600080fd5b8063158ef93e11610205578063158ef93e1461029b57806318160ddd146102af57806319262d30146102b75780631e85cd65146102ca57806329605e77146102d357600080fd5b80628cc26214610236578063022ba18d1461025c578063046335d0146102655780630666798a14610288575b600080fd5b61024961024436600461202a565b61050a565b6040519081526020015b60405180910390f35b610249600b5481565b61027861027336600461202a565b61059b565b6040519015158152602001610253565b61027861029636600461202a565b610639565b60055461027890600160a01b900460ff1681565b600154610249565b6102786102c536600461202a565b6106cf565b610249600a5481565b6102e66102e136600461202a565b610765565b005b6102e6610779565b6102e66102fe36600461204e565b6107b6565b610249610aec565b6005546001600160a01b03163314610278565b610249610b02565b6102e6610334366004612067565b610b15565b6005546001600160a01b03165b6040516001600160a01b039091168152602001610253565b600754610346906001600160a01b031681565b600654610346906001600160a01b031681565b61024961039236600461202a565b6001600160a01b031660009081526002602052604090205490565b6102496103bb36600461202a565b6001600160a01b031660009081526008602052604090205490565b6102e6610be4565b6102e6610bf6565b6103f96103f436600461204e565b610c48565b60408051938452602084019290925290820152606001610253565b6004546001600160a01b0316610346565b610249610c7b565b6102e661043b36600461204e565b610ce9565b6102e661044e36600461204e565b610fb9565b610249600c5481565b600054610346906001600160a01b031681565b6102e661047d36600461202a565b6111d9565b6102e661120c565b6102e66104983660046120a9565b6115ac565b61024961176d565b6102e66104b33660046120e9565b6117b7565b6102496118d9565b6103f96104ce36600461202a565b60086020526000908152604090208054600182015460029092015490919083565b6102e6611923565b6102e661050536600461202a565b61193c565b6000806105156119b2565b604001519050600061052684611a2c565b6040908101516001600160a01b0386166000908152600860205291909120600101549091506105939061058d670de0b6b3a76400006105876105688787611abf565b6001600160a01b038a1660009081526002602052604090205490611ad4565b90611ae0565b90611aec565b949350505050565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa1580156105e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106099190612115565b600b546001600160a01b03841660009081526008602052604090206002015461063191611aec565b111592915050565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015610683573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a79190612115565b600c546001600160a01b03841660009081526008602052604090206002015461063191611aec565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015610719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073d9190612115565b600a546001600160a01b03841660009081526008602052604090206002015461063191611aec565b61076d611af8565b61077681611b52565b50565b6005546001600160a01b031633146107ac5760405162461bcd60e51b81526004016107a39061212e565b60405180910390fd5b6107b4610bf6565b565b43600090815260036020908152604080832032845290915290205460ff16156107f15760405162461bcd60e51b81526004016107a390612172565b43600090815260036020908152604080832033845290915290205460ff161561082c5760405162461bcd60e51b81526004016107a390612172565b33600090815260026020526040812054116108975760405162461bcd60e51b815260206004820152602560248201527f4d61736f6e72793a20546865206d61736f6e5573657220646f6573206e6f7420604482015264195e1a5cdd60da1b60648201526084016107a3565b338015610928576001600160a01b03811660009081526008602090815260409182902082516060810184528154815260018201549281019290925260020154918101919091526108e68261050a565b60208201526108f3610aec565b81526001600160a01b038216600090815260086020908152604091829020835181559083015160018201559101516002909101555b600082116109785760405162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f74207769746864726177203000000000000060448201526064016107a3565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ef9190612115565b600a5433600090815260086020526040902060020154610a0e91611aec565b1115610a665760405162461bcd60e51b815260206004820152602160248201527f4d61736f6e72793a207374696c6c20696e207769746864726177206c6f636b756044820152600760fc1b60648201526084016107a3565b610a6e61120c565b610a7782611c16565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250504360009081526003602090815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b600954600090610afd906001611abf565b905090565b6000610b0c6119b2565b60400151905090565b6005546001600160a01b03163314610b3f5760405162461bcd60e51b81526004016107a39061212e565b6006546001600160a01b0390811690841603610b855760405162461bcd60e51b8152602060048201526005602482015264736e616b6560d81b60448201526064016107a3565b6000546001600160a01b0390811690841603610bcb5760405162461bcd60e51b8152602060048201526005602482015264736861726560d81b60448201526064016107a3565b610bdf6001600160a01b0384168284611cd4565b505050565b610bec611af8565b6107b46000611d37565b610bfe611af8565b6005546040516000916001600160a01b0316907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908390a3600580546001600160a01b0319169055565b60098181548110610c5857600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015610cc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afd9190612115565b43600090815260036020908152604080832032845290915290205460ff1615610d245760405162461bcd60e51b81526004016107a390612172565b43600090815260036020908152604080832033845290915290205460ff1615610d5f5760405162461bcd60e51b81526004016107a390612172565b6005546001600160a01b03163314610d895760405162461bcd60e51b81526004016107a39061212e565b60008111610dd95760405162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f63617465203000000000000060448201526064016107a3565b6000610de460015490565b11610e485760405162461bcd60e51b815260206004820152602e60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f63617465207768656e20746f60448201526d074616c537570706c7920697320360941b60648201526084016107a3565b6000610e526119b2565b6040015190506000610e82610e7b610e6960015490565b61058786670de0b6b3a7640000611ad4565b8390611aec565b60408051606081018252438152602081018681529181018381526009805460018101825560009190915282517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af60039092029182015592517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0840155517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b19092019190915560065491925090610f43906001600160a01b0316333087611d89565b60405184815233907fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e299060200160405180910390a250504360009081526003602090815260408083203284529091528082208054600160ff19918216811790925533845291909220805490911690911790555050565b43600090815260036020908152604080832032845290915290205460ff1615610ff45760405162461bcd60e51b81526004016107a390612172565b43600090815260036020908152604080832033845290915290205460ff161561102f5760405162461bcd60e51b81526004016107a390612172565b3380156110c0576001600160a01b038116600090815260086020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261107e8261050a565b602082015261108b610aec565b81526001600160a01b038216600090815260086020908152604091829020835181559083015160018201559101516002909101555b600082116111105760405162461bcd60e51b815260206004820152601760248201527f4d61736f6e72793a2043616e6e6f74207374616b65203000000000000000000060448201526064016107a3565b61111982611dc7565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561116c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111909190612115565b33600081815260086020526040908190206002019290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610aa59085815260200190565b6005546001600160a01b031633146112035760405162461bcd60e51b81526004016107a39061212e565b61077681610765565b33801561129d576001600160a01b038116600090815260086020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261125b8261050a565b6020820152611268610aec565b81526001600160a01b038216600090815260086020908152604091829020835181559083015160018201559101516002909101555b3360009081526008602052604090206001015480156115a857600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132d9190612115565b600b543360009081526008602052604090206002015461134c91611aec565b111561139a5760405162461bcd60e51b815260206004820152601f60248201527f4d61736f6e72793a207374696c6c20696e20726577617264206c6f636b75700060448201526064016107a3565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa1580156113e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114089190612115565b600c543360009081526008602052604090206002015461142791611aec565b11159050600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561147e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a29190612115565b3360009081526008602052604081206002810192909255600190910155801561155f57600654604051630852cd8d60e31b8152600481018490526001600160a01b03909116906342966c6890602401600060405180830381600087803b15801561150b57600080fd5b505af115801561151f573d6000803e3d6000fd5b5050604051600081523392507fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048691506020015b60405180910390a2505050565b600654611576906001600160a01b03163384611cd4565b60405182815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048690602001611552565b5050565b600554600160a01b900460ff16156116065760405162461bcd60e51b815260206004820152601c60248201527f4d61736f6e72793a20616c726561647920696e697469616c697a65640000000060448201526064016107a3565b6005546001600160a01b031633146116305760405162461bcd60e51b81526004016107a39061212e565b600680546001600160a01b038581166001600160a01b03199283161790925560008054858416908316178155600780549385169390921692909217905560408051606081018252438082526020808301858152838501868152600980546001810182559752845160039097027f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af81019790975590517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0870155517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b1909501949094556004600a556002600b556008600c556005805460ff60a01b1916600160a01b17905591519182529133917f25ff68dd81b34665b5ba7e553ee5511bf6812e12adb4a7e2c0d9e26b3099ce79910160405180910390a250505050565b600754604080516362cb3e1360e11b815290516000926001600160a01b03169163c5967c269160048083019260209291908290030181865afa158015610cc5573d6000803e3d6000fd5b6005546001600160a01b031633146117e15760405162461bcd60e51b81526004016107a39061212e565b8183101580156117f2575060388311155b80156117ff575060388111155b6118575760405162461bcd60e51b815260206004820152602360248201527f5f77697468647261774c6f636b757045706f6368733a206f7574206f662072616044820152626e676560e81b60648201526084016107a3565b6000831180156118675750600082115b80156118735750600081115b6118cb5760405162461bcd60e51b815260206004820152602360248201527f6c6f636b757045706f636873206d75737420626520677265617465722074686160448201526206e20360ec1b60648201526084016107a3565b600a92909255600b55600c55565b6007546040805163d7112f4f60e01b815290516000926001600160a01b03169163d7112f4f9160048083019260209291908290030181865afa158015610cc5573d6000803e3d6000fd5b336000908152600260205260409020546107b4906107b6565b611944611af8565b6001600160a01b0381166119a95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107a3565b61077681611d37565b6119d660405180606001604052806000815260200160008152602001600081525090565b60096119e0610aec565b815481106119f0576119f06121b8565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b611a5060405180606001604052806000815260200160008152602001600081525090565b6009611a71836001600160a01b031660009081526008602052604090205490565b81548110611a8157611a816121b8565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509050919050565b6000611acb82846121e4565b90505b92915050565b6000611acb82846121f7565b6000611acb828461220e565b6000611acb8284612230565b6004546001600160a01b031633146107b45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107a3565b6001600160a01b038116611bbe5760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b60648201526084016107a3565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526002602052604090205481811015611c935760405162461bcd60e51b815260206004820152603460248201527f4d61736f6e72793a2077697468647261772072657175657374206772656174656044820152731c881d1a185b881cdd185ad95908185b5bdd5b9d60621b60648201526084016107a3565b600154611ca09083611abf565b600155611cad8183611abf565b3360008181526002602052604081209290925590546115a8916001600160a01b0390911690845b6040516001600160a01b038316602482015260448101829052610bdf90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611e1d565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052611dc19085906323b872dd60e01b90608401611d00565b50505050565b600154611dd49082611aec565b60015533600090815260026020526040902054611df19082611aec565b336000818152600260205260408120929092559054610776916001600160a01b03909116903084611d89565b6000611e72826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ef29092919063ffffffff16565b9050805160001480611e93575080806020019051810190611e939190612243565b610bdf5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016107a3565b6060610593848460008585600080866001600160a01b03168587604051611f199190612289565b60006040518083038185875af1925050503d8060008114611f56576040519150601f19603f3d011682016040523d82523d6000602084013e611f5b565b606091505b5091509150611f6c87838387611f77565b979650505050505050565b60608315611fe6578251600003611fdf576001600160a01b0385163b611fdf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107a3565b5081610593565b6105938383815115611ffb5781518083602001fd5b8060405162461bcd60e51b81526004016107a391906122a5565b6001600160a01b038116811461077657600080fd5b60006020828403121561203c57600080fd5b813561204781612015565b9392505050565b60006020828403121561206057600080fd5b5035919050565b60008060006060848603121561207c57600080fd5b833561208781612015565b925060208401359150604084013561209e81612015565b809150509250925092565b6000806000606084860312156120be57600080fd5b83356120c981612015565b925060208401356120d981612015565b9150604084013561209e81612015565b6000806000606084860312156120fe57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561212757600080fd5b5051919050565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b60208082526026908201527f436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756040820152653731ba34b7b760d11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115611ace57611ace6121ce565b8082028115828204841417611ace57611ace6121ce565b60008261222b57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115611ace57611ace6121ce565b60006020828403121561225557600080fd5b8151801515811461204757600080fd5b60005b83811015612280578181015183820152602001612268565b50506000910152565b6000825161229b818460208701612265565b9190910192915050565b60208152600082518060208401526122c4816040850160208701612265565b601f01601f1916919091016040019291505056fea264697066735822122029ea4fb770bf0b930229a94b4acde1b752c74ae41cd1529df90fe4bd91ab4b7164736f6c634300081a0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.