Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
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; /* ========== 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 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) external onlyOperator { require(_withdrawLockupEpochs >= _rewardLockupEpochs && _withdrawLockupEpochs <= 56, "_withdrawLockupEpochs: out of range"); // <= 2 week require(_withdrawLockupEpochs > 0 && _rewardLockupEpochs > 0); withdrawLockupEpochs = _withdrawLockupEpochs; rewardLockupEpochs = _rewardLockupEpochs; } /* ========== 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 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"); masons[msg.sender].epochTimerStart = treasury.epoch(); // reset timer masons[msg.sender].rewardEarned = 0; 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":[{"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":"uint256","name":"_withdrawLockupEpochs","type":"uint256"},{"internalType":"uint256","name":"_rewardLockupEpochs","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
60806040526005805460ff60a01b19169055348015601c57600080fd5b506024336068565b600580546001600160a01b031916339081179091556040516000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a360ba565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6120a4806100c96000396000f3fe608060405234801561001057600080fd5b506004361061021b5760003560e01c806370a0823111610125578063a8d5fd65116100ad578063c5967c261161007c578063c5967c261461047e578063d7112f4f14610486578063e0f6dc9e1461048e578063e9fad8ee146104bd578063f2fde38b146104c557600080fd5b8063a8d5fd651461043d578063b3ab15fb14610450578063b88a802f14610463578063c0c53b8b1461046b57600080fd5b80638cd9a27f116100f45780638cd9a27f146103d05780638da5cb5b146103fe578063900cf0cf1461040f57806397ffe1d714610417578063a694fc3a1461042a57600080fd5b806370a082311461036e578063714b465814610397578063715018a6146103c05780638a27f103146103c857600080fd5b80632e1a7d4d116101a8578063446a2ec811610177578063446a2ec81461030857806354575af414610310578063570ca7351461032357806361d027b3146103485780636a6adeb31461035b57600080fd5b80632e1a7d4d146102c75780632ffaaa09146102da5780633f9e3f04146102ed5780634456eda2146102f557600080fd5b806318160ddd116101ef57806318160ddd1461028657806319262d301461028e5780631e85cd65146102a157806329605e77146102aa5780632ab6f8db146102bf57600080fd5b80628cc26214610220578063022ba18d14610246578063046335d01461024f578063158ef93e14610272575b600080fd5b61023361022e366004611dca565b6104d8565b6040519081526020015b60405180910390f35b610233600b5481565b61026261025d366004611dca565b610569565b604051901515815260200161023d565b60055461026290600160a01b900460ff1681565b600154610233565b61026261029c366004611dca565b610607565b610233600a5481565b6102bd6102b8366004611dca565b61069d565b005b6102bd6106b1565b6102bd6102d5366004611dee565b6106ee565b6102bd6102e8366004611e07565b610a24565b610233610adb565b6005546001600160a01b03163314610262565b610233610af1565b6102bd61031e366004611e29565b610b04565b6005546001600160a01b03165b6040516001600160a01b03909116815260200161023d565b600754610330906001600160a01b031681565b600654610330906001600160a01b031681565b61023361037c366004611dca565b6001600160a01b031660009081526002602052604090205490565b6102336103a5366004611dca565b6001600160a01b031660009081526008602052604090205490565b6102bd610bd3565b6102bd610be5565b6103e36103de366004611dee565b610c37565b6040805193845260208401929092529082015260600161023d565b6004546001600160a01b0316610330565b610233610c6a565b6102bd610425366004611dee565b610cd8565b6102bd610438366004611dee565b610fa8565b600054610330906001600160a01b031681565b6102bd61045e366004611dca565b6111c8565b6102bd6111fb565b6102bd610479366004611e6b565b611473565b61023361162f565b610233611679565b6103e361049c366004611dca565b60086020526000908152604090208054600182015460029092015490919083565b6102bd6116c3565b6102bd6104d3366004611dca565b6116dc565b6000806104e3611752565b60400151905060006104f4846117cc565b6040908101516001600160a01b0386166000908152600860205291909120600101549091506105619061055b670de0b6b3a7640000610555610536878761185f565b6001600160a01b038a1660009081526002602052604090205490611874565b90611880565b9061188c565b949350505050565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa1580156105b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d79190611eab565b600b546001600160a01b0384166000908152600860205260409020600201546105ff9161188c565b111592915050565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015610651573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106759190611eab565b600a546001600160a01b0384166000908152600860205260409020600201546105ff9161188c565b6106a5611898565b6106ae816118f2565b50565b6005546001600160a01b031633146106e45760405162461bcd60e51b81526004016106db90611ec4565b60405180910390fd5b6106ec610be5565b565b43600090815260036020908152604080832032845290915290205460ff16156107295760405162461bcd60e51b81526004016106db90611f08565b43600090815260036020908152604080832033845290915290205460ff16156107645760405162461bcd60e51b81526004016106db90611f08565b33600090815260026020526040812054116107cf5760405162461bcd60e51b815260206004820152602560248201527f4d61736f6e72793a20546865206d61736f6e5573657220646f6573206e6f7420604482015264195e1a5cdd60da1b60648201526084016106db565b338015610860576001600160a01b038116600090815260086020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261081e826104d8565b602082015261082b610adb565b81526001600160a01b038216600090815260086020908152604091829020835181559083015160018201559101516002909101555b600082116108b05760405162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f74207769746864726177203000000000000060448201526064016106db565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610903573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109279190611eab565b600a54336000908152600860205260409020600201546109469161188c565b111561099e5760405162461bcd60e51b815260206004820152602160248201527f4d61736f6e72793a207374696c6c20696e207769746864726177206c6f636b756044820152600760fc1b60648201526084016106db565b6109a66111fb565b6109af826119b6565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250504360009081526003602090815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b6005546001600160a01b03163314610a4e5760405162461bcd60e51b81526004016106db90611ec4565b808210158015610a5f575060388211155b610ab75760405162461bcd60e51b815260206004820152602360248201527f5f77697468647261774c6f636b757045706f6368733a206f7574206f662072616044820152626e676560e81b60648201526084016106db565b600082118015610ac75750600081115b610ad057600080fd5b600a91909155600b55565b600954600090610aec90600161185f565b905090565b6000610afb611752565b60400151905090565b6005546001600160a01b03163314610b2e5760405162461bcd60e51b81526004016106db90611ec4565b6006546001600160a01b0390811690841603610b745760405162461bcd60e51b8152602060048201526005602482015264736e616b6560d81b60448201526064016106db565b6000546001600160a01b0390811690841603610bba5760405162461bcd60e51b8152602060048201526005602482015264736861726560d81b60448201526064016106db565b610bce6001600160a01b0384168284611a74565b505050565b610bdb611898565b6106ec6000611ad7565b610bed611898565b6005546040516000916001600160a01b0316907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908390a3600580546001600160a01b0319169055565b60098181548110610c4757600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015610cb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aec9190611eab565b43600090815260036020908152604080832032845290915290205460ff1615610d135760405162461bcd60e51b81526004016106db90611f08565b43600090815260036020908152604080832033845290915290205460ff1615610d4e5760405162461bcd60e51b81526004016106db90611f08565b6005546001600160a01b03163314610d785760405162461bcd60e51b81526004016106db90611ec4565b60008111610dc85760405162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f63617465203000000000000060448201526064016106db565b6000610dd360015490565b11610e375760405162461bcd60e51b815260206004820152602e60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f63617465207768656e20746f60448201526d074616c537570706c7920697320360941b60648201526084016106db565b6000610e41611752565b6040015190506000610e71610e6a610e5860015490565b61055586670de0b6b3a7640000611874565b839061188c565b60408051606081018252438152602081018681529181018381526009805460018101825560009190915282517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af60039092029182015592517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0840155517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b19092019190915560065491925090610f32906001600160a01b0316333087611b29565b60405184815233907fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e299060200160405180910390a250504360009081526003602090815260408083203284529091528082208054600160ff19918216811790925533845291909220805490911690911790555050565b43600090815260036020908152604080832032845290915290205460ff1615610fe35760405162461bcd60e51b81526004016106db90611f08565b43600090815260036020908152604080832033845290915290205460ff161561101e5760405162461bcd60e51b81526004016106db90611f08565b3380156110af576001600160a01b038116600090815260086020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261106d826104d8565b602082015261107a610adb565b81526001600160a01b038216600090815260086020908152604091829020835181559083015160018201559101516002909101555b600082116110ff5760405162461bcd60e51b815260206004820152601760248201527f4d61736f6e72793a2043616e6e6f74207374616b65203000000000000000000060448201526064016106db565b61110882611b67565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561115b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117f9190611eab565b33600081815260086020526040908190206002019290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906109dd9085815260200190565b6005546001600160a01b031633146111f25760405162461bcd60e51b81526004016106db90611ec4565b6106ae8161069d565b33801561128c576001600160a01b038116600090815260086020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261124a826104d8565b6020820152611257610adb565b81526001600160a01b038216600090815260086020908152604091829020835181559083015160018201559101516002909101555b33600090815260086020526040902060010154801561146f57600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131c9190611eab565b600b543360009081526008602052604090206002015461133b9161188c565b11156113895760405162461bcd60e51b815260206004820152601f60248201527f4d61736f6e72793a207374696c6c20696e20726577617264206c6f636b75700060448201526064016106db565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114009190611eab565b3360008181526008602052604081206002810193909355600190920191909155600654611439916001600160a01b039091169083611a74565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25b5050565b600554600160a01b900460ff16156114cd5760405162461bcd60e51b815260206004820152601c60248201527f4d61736f6e72793a20616c726561647920696e697469616c697a65640000000060448201526064016106db565b6005546001600160a01b031633146114f75760405162461bcd60e51b81526004016106db90611ec4565b600680546001600160a01b038581166001600160a01b03199283161790925560008054858416908316178155600780549385169390921692909217905560408051606081018252438082526020808301858152838501868152600980546001810182559752845160039097027f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af81019790975590517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0870155517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b1909501949094556004600a556002600b556005805460ff60a01b1916600160a01b17905591519182529133917f25ff68dd81b34665b5ba7e553ee5511bf6812e12adb4a7e2c0d9e26b3099ce79910160405180910390a250505050565b600754604080516362cb3e1360e11b815290516000926001600160a01b03169163c5967c269160048083019260209291908290030181865afa158015610cb4573d6000803e3d6000fd5b6007546040805163d7112f4f60e01b815290516000926001600160a01b03169163d7112f4f9160048083019260209291908290030181865afa158015610cb4573d6000803e3d6000fd5b336000908152600260205260409020546106ec906106ee565b6116e4611898565b6001600160a01b0381166117495760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106db565b6106ae81611ad7565b61177660405180606001604052806000815260200160008152602001600081525090565b6009611780610adb565b8154811061179057611790611f4e565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b6117f060405180606001604052806000815260200160008152602001600081525090565b6009611811836001600160a01b031660009081526008602052604090205490565b8154811061182157611821611f4e565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509050919050565b600061186b8284611f7a565b90505b92915050565b600061186b8284611f8d565b600061186b8284611fa4565b600061186b8284611fc6565b6004546001600160a01b031633146106ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106db565b6001600160a01b03811661195e5760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b60648201526084016106db565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526002602052604090205481811015611a335760405162461bcd60e51b815260206004820152603460248201527f4d61736f6e72793a2077697468647261772072657175657374206772656174656044820152731c881d1a185b881cdd185ad95908185b5bdd5b9d60621b60648201526084016106db565b600154611a40908361185f565b600155611a4d818361185f565b33600081815260026020526040812092909255905461146f916001600160a01b0390911690845b6040516001600160a01b038316602482015260448101829052610bce90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611bbd565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052611b619085906323b872dd60e01b90608401611aa0565b50505050565b600154611b74908261188c565b60015533600090815260026020526040902054611b91908261188c565b3360008181526002602052604081209290925590546106ae916001600160a01b03909116903084611b29565b6000611c12826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611c929092919063ffffffff16565b9050805160001480611c33575080806020019051810190611c339190611fd9565b610bce5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106db565b6060610561848460008585600080866001600160a01b03168587604051611cb9919061201f565b60006040518083038185875af1925050503d8060008114611cf6576040519150601f19603f3d011682016040523d82523d6000602084013e611cfb565b606091505b5091509150611d0c87838387611d17565b979650505050505050565b60608315611d86578251600003611d7f576001600160a01b0385163b611d7f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106db565b5081610561565b6105618383815115611d9b5781518083602001fd5b8060405162461bcd60e51b81526004016106db919061203b565b6001600160a01b03811681146106ae57600080fd5b600060208284031215611ddc57600080fd5b8135611de781611db5565b9392505050565b600060208284031215611e0057600080fd5b5035919050565b60008060408385031215611e1a57600080fd5b50508035926020909101359150565b600080600060608486031215611e3e57600080fd5b8335611e4981611db5565b9250602084013591506040840135611e6081611db5565b809150509250925092565b600080600060608486031215611e8057600080fd5b8335611e8b81611db5565b92506020840135611e9b81611db5565b91506040840135611e6081611db5565b600060208284031215611ebd57600080fd5b5051919050565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b60208082526026908201527f436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756040820152653731ba34b7b760d11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561186e5761186e611f64565b808202811582820484141761186e5761186e611f64565b600082611fc157634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561186e5761186e611f64565b600060208284031215611feb57600080fd5b81518015158114611de757600080fd5b60005b83811015612016578181015183820152602001611ffe565b50506000910152565b60008251612031818460208701611ffb565b9190910192915050565b602081526000825180602084015261205a816040850160208701611ffb565b601f01601f1916919091016040019291505056fea2646970667358221220f57e345984cc0a0545b39f513256ef15ecc63ba00c9f37681e852ce2606b1e2764736f6c634300081a0033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061021b5760003560e01c806370a0823111610125578063a8d5fd65116100ad578063c5967c261161007c578063c5967c261461047e578063d7112f4f14610486578063e0f6dc9e1461048e578063e9fad8ee146104bd578063f2fde38b146104c557600080fd5b8063a8d5fd651461043d578063b3ab15fb14610450578063b88a802f14610463578063c0c53b8b1461046b57600080fd5b80638cd9a27f116100f45780638cd9a27f146103d05780638da5cb5b146103fe578063900cf0cf1461040f57806397ffe1d714610417578063a694fc3a1461042a57600080fd5b806370a082311461036e578063714b465814610397578063715018a6146103c05780638a27f103146103c857600080fd5b80632e1a7d4d116101a8578063446a2ec811610177578063446a2ec81461030857806354575af414610310578063570ca7351461032357806361d027b3146103485780636a6adeb31461035b57600080fd5b80632e1a7d4d146102c75780632ffaaa09146102da5780633f9e3f04146102ed5780634456eda2146102f557600080fd5b806318160ddd116101ef57806318160ddd1461028657806319262d301461028e5780631e85cd65146102a157806329605e77146102aa5780632ab6f8db146102bf57600080fd5b80628cc26214610220578063022ba18d14610246578063046335d01461024f578063158ef93e14610272575b600080fd5b61023361022e366004611dca565b6104d8565b6040519081526020015b60405180910390f35b610233600b5481565b61026261025d366004611dca565b610569565b604051901515815260200161023d565b60055461026290600160a01b900460ff1681565b600154610233565b61026261029c366004611dca565b610607565b610233600a5481565b6102bd6102b8366004611dca565b61069d565b005b6102bd6106b1565b6102bd6102d5366004611dee565b6106ee565b6102bd6102e8366004611e07565b610a24565b610233610adb565b6005546001600160a01b03163314610262565b610233610af1565b6102bd61031e366004611e29565b610b04565b6005546001600160a01b03165b6040516001600160a01b03909116815260200161023d565b600754610330906001600160a01b031681565b600654610330906001600160a01b031681565b61023361037c366004611dca565b6001600160a01b031660009081526002602052604090205490565b6102336103a5366004611dca565b6001600160a01b031660009081526008602052604090205490565b6102bd610bd3565b6102bd610be5565b6103e36103de366004611dee565b610c37565b6040805193845260208401929092529082015260600161023d565b6004546001600160a01b0316610330565b610233610c6a565b6102bd610425366004611dee565b610cd8565b6102bd610438366004611dee565b610fa8565b600054610330906001600160a01b031681565b6102bd61045e366004611dca565b6111c8565b6102bd6111fb565b6102bd610479366004611e6b565b611473565b61023361162f565b610233611679565b6103e361049c366004611dca565b60086020526000908152604090208054600182015460029092015490919083565b6102bd6116c3565b6102bd6104d3366004611dca565b6116dc565b6000806104e3611752565b60400151905060006104f4846117cc565b6040908101516001600160a01b0386166000908152600860205291909120600101549091506105619061055b670de0b6b3a7640000610555610536878761185f565b6001600160a01b038a1660009081526002602052604090205490611874565b90611880565b9061188c565b949350505050565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa1580156105b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d79190611eab565b600b546001600160a01b0384166000908152600860205260409020600201546105ff9161188c565b111592915050565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015610651573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106759190611eab565b600a546001600160a01b0384166000908152600860205260409020600201546105ff9161188c565b6106a5611898565b6106ae816118f2565b50565b6005546001600160a01b031633146106e45760405162461bcd60e51b81526004016106db90611ec4565b60405180910390fd5b6106ec610be5565b565b43600090815260036020908152604080832032845290915290205460ff16156107295760405162461bcd60e51b81526004016106db90611f08565b43600090815260036020908152604080832033845290915290205460ff16156107645760405162461bcd60e51b81526004016106db90611f08565b33600090815260026020526040812054116107cf5760405162461bcd60e51b815260206004820152602560248201527f4d61736f6e72793a20546865206d61736f6e5573657220646f6573206e6f7420604482015264195e1a5cdd60da1b60648201526084016106db565b338015610860576001600160a01b038116600090815260086020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261081e826104d8565b602082015261082b610adb565b81526001600160a01b038216600090815260086020908152604091829020835181559083015160018201559101516002909101555b600082116108b05760405162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f74207769746864726177203000000000000060448201526064016106db565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610903573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109279190611eab565b600a54336000908152600860205260409020600201546109469161188c565b111561099e5760405162461bcd60e51b815260206004820152602160248201527f4d61736f6e72793a207374696c6c20696e207769746864726177206c6f636b756044820152600760fc1b60648201526084016106db565b6109a66111fb565b6109af826119b6565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250504360009081526003602090815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b6005546001600160a01b03163314610a4e5760405162461bcd60e51b81526004016106db90611ec4565b808210158015610a5f575060388211155b610ab75760405162461bcd60e51b815260206004820152602360248201527f5f77697468647261774c6f636b757045706f6368733a206f7574206f662072616044820152626e676560e81b60648201526084016106db565b600082118015610ac75750600081115b610ad057600080fd5b600a91909155600b55565b600954600090610aec90600161185f565b905090565b6000610afb611752565b60400151905090565b6005546001600160a01b03163314610b2e5760405162461bcd60e51b81526004016106db90611ec4565b6006546001600160a01b0390811690841603610b745760405162461bcd60e51b8152602060048201526005602482015264736e616b6560d81b60448201526064016106db565b6000546001600160a01b0390811690841603610bba5760405162461bcd60e51b8152602060048201526005602482015264736861726560d81b60448201526064016106db565b610bce6001600160a01b0384168284611a74565b505050565b610bdb611898565b6106ec6000611ad7565b610bed611898565b6005546040516000916001600160a01b0316907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908390a3600580546001600160a01b0319169055565b60098181548110610c4757600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015610cb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aec9190611eab565b43600090815260036020908152604080832032845290915290205460ff1615610d135760405162461bcd60e51b81526004016106db90611f08565b43600090815260036020908152604080832033845290915290205460ff1615610d4e5760405162461bcd60e51b81526004016106db90611f08565b6005546001600160a01b03163314610d785760405162461bcd60e51b81526004016106db90611ec4565b60008111610dc85760405162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f63617465203000000000000060448201526064016106db565b6000610dd360015490565b11610e375760405162461bcd60e51b815260206004820152602e60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f63617465207768656e20746f60448201526d074616c537570706c7920697320360941b60648201526084016106db565b6000610e41611752565b6040015190506000610e71610e6a610e5860015490565b61055586670de0b6b3a7640000611874565b839061188c565b60408051606081018252438152602081018681529181018381526009805460018101825560009190915282517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af60039092029182015592517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0840155517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b19092019190915560065491925090610f32906001600160a01b0316333087611b29565b60405184815233907fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e299060200160405180910390a250504360009081526003602090815260408083203284529091528082208054600160ff19918216811790925533845291909220805490911690911790555050565b43600090815260036020908152604080832032845290915290205460ff1615610fe35760405162461bcd60e51b81526004016106db90611f08565b43600090815260036020908152604080832033845290915290205460ff161561101e5760405162461bcd60e51b81526004016106db90611f08565b3380156110af576001600160a01b038116600090815260086020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261106d826104d8565b602082015261107a610adb565b81526001600160a01b038216600090815260086020908152604091829020835181559083015160018201559101516002909101555b600082116110ff5760405162461bcd60e51b815260206004820152601760248201527f4d61736f6e72793a2043616e6e6f74207374616b65203000000000000000000060448201526064016106db565b61110882611b67565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561115b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117f9190611eab565b33600081815260086020526040908190206002019290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906109dd9085815260200190565b6005546001600160a01b031633146111f25760405162461bcd60e51b81526004016106db90611ec4565b6106ae8161069d565b33801561128c576001600160a01b038116600090815260086020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261124a826104d8565b6020820152611257610adb565b81526001600160a01b038216600090815260086020908152604091829020835181559083015160018201559101516002909101555b33600090815260086020526040902060010154801561146f57600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131c9190611eab565b600b543360009081526008602052604090206002015461133b9161188c565b11156113895760405162461bcd60e51b815260206004820152601f60248201527f4d61736f6e72793a207374696c6c20696e20726577617264206c6f636b75700060448201526064016106db565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114009190611eab565b3360008181526008602052604081206002810193909355600190920191909155600654611439916001600160a01b039091169083611a74565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25b5050565b600554600160a01b900460ff16156114cd5760405162461bcd60e51b815260206004820152601c60248201527f4d61736f6e72793a20616c726561647920696e697469616c697a65640000000060448201526064016106db565b6005546001600160a01b031633146114f75760405162461bcd60e51b81526004016106db90611ec4565b600680546001600160a01b038581166001600160a01b03199283161790925560008054858416908316178155600780549385169390921692909217905560408051606081018252438082526020808301858152838501868152600980546001810182559752845160039097027f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af81019790975590517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0870155517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b1909501949094556004600a556002600b556005805460ff60a01b1916600160a01b17905591519182529133917f25ff68dd81b34665b5ba7e553ee5511bf6812e12adb4a7e2c0d9e26b3099ce79910160405180910390a250505050565b600754604080516362cb3e1360e11b815290516000926001600160a01b03169163c5967c269160048083019260209291908290030181865afa158015610cb4573d6000803e3d6000fd5b6007546040805163d7112f4f60e01b815290516000926001600160a01b03169163d7112f4f9160048083019260209291908290030181865afa158015610cb4573d6000803e3d6000fd5b336000908152600260205260409020546106ec906106ee565b6116e4611898565b6001600160a01b0381166117495760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106db565b6106ae81611ad7565b61177660405180606001604052806000815260200160008152602001600081525090565b6009611780610adb565b8154811061179057611790611f4e565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b6117f060405180606001604052806000815260200160008152602001600081525090565b6009611811836001600160a01b031660009081526008602052604090205490565b8154811061182157611821611f4e565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509050919050565b600061186b8284611f7a565b90505b92915050565b600061186b8284611f8d565b600061186b8284611fa4565b600061186b8284611fc6565b6004546001600160a01b031633146106ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106db565b6001600160a01b03811661195e5760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b60648201526084016106db565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526002602052604090205481811015611a335760405162461bcd60e51b815260206004820152603460248201527f4d61736f6e72793a2077697468647261772072657175657374206772656174656044820152731c881d1a185b881cdd185ad95908185b5bdd5b9d60621b60648201526084016106db565b600154611a40908361185f565b600155611a4d818361185f565b33600081815260026020526040812092909255905461146f916001600160a01b0390911690845b6040516001600160a01b038316602482015260448101829052610bce90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611bbd565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052611b619085906323b872dd60e01b90608401611aa0565b50505050565b600154611b74908261188c565b60015533600090815260026020526040902054611b91908261188c565b3360008181526002602052604081209290925590546106ae916001600160a01b03909116903084611b29565b6000611c12826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611c929092919063ffffffff16565b9050805160001480611c33575080806020019051810190611c339190611fd9565b610bce5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106db565b6060610561848460008585600080866001600160a01b03168587604051611cb9919061201f565b60006040518083038185875af1925050503d8060008114611cf6576040519150601f19603f3d011682016040523d82523d6000602084013e611cfb565b606091505b5091509150611d0c87838387611d17565b979650505050505050565b60608315611d86578251600003611d7f576001600160a01b0385163b611d7f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106db565b5081610561565b6105618383815115611d9b5781518083602001fd5b8060405162461bcd60e51b81526004016106db919061203b565b6001600160a01b03811681146106ae57600080fd5b600060208284031215611ddc57600080fd5b8135611de781611db5565b9392505050565b600060208284031215611e0057600080fd5b5035919050565b60008060408385031215611e1a57600080fd5b50508035926020909101359150565b600080600060608486031215611e3e57600080fd5b8335611e4981611db5565b9250602084013591506040840135611e6081611db5565b809150509250925092565b600080600060608486031215611e8057600080fd5b8335611e8b81611db5565b92506020840135611e9b81611db5565b91506040840135611e6081611db5565b600060208284031215611ebd57600080fd5b5051919050565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b60208082526026908201527f436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756040820152653731ba34b7b760d11b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561186e5761186e611f64565b808202811582820484141761186e5761186e611f64565b600082611fc157634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561186e5761186e611f64565b600060208284031215611feb57600080fd5b81518015158114611de757600080fd5b60005b83811015612016578181015183820152602001611ffe565b50506000910152565b60008251612031818460208701611ffb565b9190910192915050565b602081526000825180602084015261205a816040850160208701611ffb565b601f01601f1916919091016040019291505056fea2646970667358221220f57e345984cc0a0545b39f513256ef15ecc63ba00c9f37681e852ce2606b1e2764736f6c634300081a0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.