More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 340 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Unstake | 15978562 | 841 days ago | IN | 0 ETH | 0.00211024 | ||||
Unstake | 15608833 | 893 days ago | IN | 0 ETH | 0.00055625 | ||||
Unstake | 15608830 | 893 days ago | IN | 0 ETH | 0.00110379 | ||||
Unstake | 15458137 | 916 days ago | IN | 0 ETH | 0.00111232 | ||||
Unstake | 15458134 | 916 days ago | IN | 0 ETH | 0.00278812 | ||||
Unstake | 15458126 | 916 days ago | IN | 0 ETH | 0.00658506 | ||||
Stake Token | 15237773 | 950 days ago | IN | 0 ETH | 0.00796441 | ||||
Stake Token | 15114166 | 970 days ago | IN | 0 ETH | 0.0018135 | ||||
Unstake | 15041485 | 981 days ago | IN | 0 ETH | 0.00415854 | ||||
Unstake | 14734530 | 1033 days ago | IN | 0 ETH | 0.00495987 | ||||
Stake Token | 14673134 | 1042 days ago | IN | 0 ETH | 0.00586451 | ||||
Unstake | 14672522 | 1043 days ago | IN | 0 ETH | 0.00427105 | ||||
Unstake | 14669513 | 1043 days ago | IN | 0 ETH | 0.03318097 | ||||
Unstake | 14659210 | 1045 days ago | IN | 0 ETH | 0.00293725 | ||||
Unstake | 14657534 | 1045 days ago | IN | 0 ETH | 0.07795317 | ||||
Unstake | 14657075 | 1045 days ago | IN | 0 ETH | 0.00717816 | ||||
Unstake | 14654892 | 1045 days ago | IN | 0 ETH | 0.00744904 | ||||
Unstake | 14653473 | 1046 days ago | IN | 0 ETH | 0.00499167 | ||||
Unstake | 14653081 | 1046 days ago | IN | 0 ETH | 0.0043952 | ||||
Unstake | 14651618 | 1046 days ago | IN | 0 ETH | 0.00488811 | ||||
Unstake | 14651500 | 1046 days ago | IN | 0 ETH | 0.007102 | ||||
Unstake | 14645810 | 1047 days ago | IN | 0 ETH | 0.00306698 | ||||
Stake Token | 14626904 | 1050 days ago | IN | 0 ETH | 0.01278898 | ||||
Stake Token | 14614407 | 1052 days ago | IN | 0 ETH | 0.00917961 | ||||
Stake Token | 14602607 | 1054 days ago | IN | 0 ETH | 0.00342944 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Staking
Compiler Version
v0.8.12+commit.f00d7308
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2022-03-11 */ // SPDX-License-Identifier: MIT // File: @openzeppelin/contracts/token/ERC20/IERC20.sol // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `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); /** * @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); } // File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } // File: @openzeppelin/contracts/utils/Strings.sol // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } } // File: @openzeppelin/contracts/utils/cryptography/ECDSA.sol // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } } // File: @openzeppelin/contracts/utils/Context.sol // OpenZeppelin Contracts v4.4.1 (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; } } // File: @openzeppelin/contracts/access/Ownable.sol // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: @openzeppelin/contracts/token/ERC20/ERC20.sol // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, _allowances[owner][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = _allowances[owner][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Spend `amount` form the allowance of `owner` toward `spender`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } // File: @openzeppelin/contracts/utils/Address.sol // OpenZeppelin Contracts (last updated v4.5.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 * ==== * * [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://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } // File: @openzeppelin/contracts/utils/introspection/IERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: @openzeppelin/contracts/utils/introspection/ERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File: @openzeppelin/contracts/token/ERC721/IERC721.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } // File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); } // File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); } // File: @openzeppelin/contracts/token/ERC721/ERC721.sol // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } // File: @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } } // File: contracts/staking.sol pragma solidity ^0.8.12; interface IStaking { function getBaseAmount(address _user) external view returns(uint256); } contract BUGS is ERC20("$BUGS", "$BUGS"), Ownable { uint256 public timeRate = 60 * 60 * 24; mapping(address => uint256) public rewards; mapping(address => uint256) public lastUpdate; IStaking public stakingContract; constructor(address _staking) { stakingContract = IStaking(_staking); } function setStakingContract(address _staking) external onlyOwner { stakingContract = IStaking(_staking); } function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } function setTimeRate(uint256 _timeRate) external onlyOwner { timeRate = _timeRate; } function getNewReward(address _user) public view returns (uint256) { uint256 time = block.timestamp; uint256 timerUser = lastUpdate[_user]; uint256 result = 0; if (timerUser > 0) result = rewards[_user] + stakingContract.getBaseAmount(_user) * (time - timerUser) / (timeRate); else result = rewards[_user]; return result; } function calculateNewReward(address _user) public { uint256 time = block.timestamp; rewards[_user] = getNewReward(_user); lastUpdate[_user] = time; } function claimReward(address _to) external { calculateNewReward(_to); uint256 reward = rewards[_to]; if (reward > 0) { rewards[_to] = 0; _mint(_to, reward); } } function giftTokens(address _to, uint256 giftAmount) external onlyOwner { _mint(_to, giftAmount); } } contract Staking is IERC721Receiver, Ownable { using Strings for uint256; BUGS public rewardToken; struct TokenInfo { string uri; uint256 contractIdx; uint256 tokenId; uint256 tokenRate; } address[] public collectionAddresses = [ 0xc652C1800e28ADD44224F2eE0C94cAC5e9264e9C, // genesis 0x415f65ADFa35BC957507944554492C75FF1DC45F // gen 1 ]; uint256[] public baseRates = [ 100 ether, 5 ether ]; mapping(address => mapping(uint256 => uint256)) overrideBaseRate; // Mapping from owner to list of owned token [IDs, collectionIdx] mapping(address => mapping(uint256 => uint256[2])) public _ownedTokens; mapping(uint256 => address) _owners; mapping(address => uint256) public _balances; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) public _ownedTokensIndex; uint256 public numberOfStaked; uint256[] public _allTokens; mapping(uint256 => uint256) public _allTokensIndex; function setOverrideBaseRate(address collection, uint256 tokenId, uint256 baseRate) external onlyOwner { overrideBaseRate[collection][tokenId] = baseRate; } function setOverrideBaseRates(address collection, uint256[] memory tokenIds, uint256[] memory tokenBaseRates) external onlyOwner { require(tokenIds.length == baseRates.length, "Arrays must be the same length"); for (uint256 i = 0; i < tokenIds.length; i++) { overrideBaseRate[collection][tokenIds[i]] = tokenBaseRates[i]; } } function setCollectionAddress(uint256 idx, address to) external onlyOwner { collectionAddresses[idx] = to; } function setBaseRate(uint256 idx, uint256 rate) external onlyOwner { baseRates[idx] = rate; } function addCollection(address contractAddress, uint256 rate) external onlyOwner { collectionAddresses.push(contractAddress); baseRates.push(rate); } function onERC721Received(address, address, uint256, bytes calldata) pure external override(IERC721Receiver) returns(bytes4) { return IERC721Receiver.onERC721Received.selector; } function getCollectionAddresses() public view returns (address[] memory) { return collectionAddresses; } function getBaseRates() public view returns (uint256[] memory) { return baseRates; } // You can ignore the functions with _ at the start of their names function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } function _addTokenToOwnerEnumeration(address to, uint256 tokenId, uint256 collectionIdx) private { uint256 length = _balances[to]; _ownedTokens[to][length][0] = tokenId; _ownedTokens[to][length][1] = collectionIdx; _ownedTokensIndex[tokenId] = length; _balances[to]++; _addTokenToAllTokensEnumeration(tokenId); numberOfStaked++; } function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _balances[from] - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex][0]; uint256 lastTokenContractIdx = _ownedTokens[from][lastTokenIndex][1]; _ownedTokens[from][tokenIndex][0] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokens[from][tokenIndex][1] = lastTokenContractIdx; _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; _balances[from]--; _removeTokenFromAllTokensEnumeration(tokenId); numberOfStaked--; } function getTokenRate(uint256 tokenId, uint256 collectionIdx) public view returns (uint256) { if (overrideBaseRate[collectionAddresses[collectionIdx]][tokenId] > 0) { return overrideBaseRate[collectionAddresses[collectionIdx]][tokenId]; } else { return baseRates[collectionIdx]; } } // Returns all the token uris and token ids for a given user address that are not staked // inside the contract function getUnstaked(address targetAddress) public view returns(TokenInfo[] memory) { uint256 totalBalance = 0; for(uint256 j = 0; j < collectionAddresses.length; j++){ ERC721Enumerable collectionContract = ERC721Enumerable(collectionAddresses[j]); totalBalance += collectionContract.balanceOf(targetAddress); } TokenInfo[] memory tokenInfo = new TokenInfo[](totalBalance); uint256 currentIdx = 0; for(uint256 j = 0; j < collectionAddresses.length; j++){ ERC721Enumerable collectionContract = ERC721Enumerable(collectionAddresses[j]); for(uint256 i = 0; i < collectionContract.balanceOf(targetAddress); i++){ uint256 tokenId = collectionContract.tokenOfOwnerByIndex(targetAddress, i); tokenInfo[currentIdx].uri = collectionContract.tokenURI(tokenId); tokenInfo[currentIdx].tokenId = tokenId; tokenInfo[currentIdx].contractIdx = j; tokenInfo[currentIdx].tokenRate = getTokenRate(tokenInfo[currentIdx].tokenId, tokenInfo[currentIdx].contractIdx); currentIdx++; } } return tokenInfo; } // same as tokenUris but only for the staked function getStaked(address targetAddress) external view returns (TokenInfo[] memory) { TokenInfo[] memory tokenInfo = new TokenInfo[](_balances[targetAddress]); for(uint256 i = 0; i < _balances[targetAddress]; i++){ tokenInfo[i].tokenId = _ownedTokens[targetAddress][i][0]; tokenInfo[i].contractIdx = _ownedTokens[targetAddress][i][1]; tokenInfo[i].uri = ERC721Enumerable(collectionAddresses[tokenInfo[i].contractIdx]).tokenURI(tokenInfo[i].tokenId); tokenInfo[i].tokenRate = getTokenRate(tokenInfo[i].tokenId, tokenInfo[i].contractIdx ); } return tokenInfo; } function setRewardToken(address _rewardToken) external onlyOwner { rewardToken = BUGS(_rewardToken); } function _min(uint256 a, uint256 b) private pure returns(uint256) { return a >= b ? b : a; } function getBaseAmount(address targetAddress) public view returns (uint256) { uint256 sum = 0; for(uint256 i = 0; i < _balances[targetAddress]; i++){ uint256 tokenId = _ownedTokens[targetAddress][i][0]; uint256 collectionIdx = _ownedTokens[targetAddress][i][1]; sum += getTokenRate(tokenId, collectionIdx); } return sum; } // transfer tokens from user to the contract for staking function stakeToken(uint256[]calldata tokenIds, uint256[]calldata collectionIdx) external { require(tokenIds.length == collectionIdx.length, "Array lengths must match"); rewardToken.calculateNewReward(msg.sender); for(uint256 i = 0; i < tokenIds.length; i++){ ERC721Enumerable collectionContract = ERC721Enumerable(collectionAddresses[collectionIdx[i]]); collectionContract.transferFrom(msg.sender, address(this), tokenIds[i]); _addTokenToOwnerEnumeration(msg.sender, tokenIds[i], collectionIdx[i]); _owners[tokenIds[i]] = msg.sender; } } // tranfers the token back to the user from the contract function unstake(uint256[]calldata tokenIds, uint256[]calldata collectionIdx) external { require(tokenIds.length == collectionIdx.length, "Array lengths must match"); for(uint256 i = 0; i < tokenIds.length; i++){ require(_owners[tokenIds[i]] == msg.sender, "Trying to unstake unowned token"); IERC721(collectionAddresses[collectionIdx[i]]).transferFrom(address(this), msg.sender, tokenIds[i]); _removeTokenFromOwnerEnumeration(msg.sender, tokenIds[i]); _owners[tokenIds[i]] = address(0); } rewardToken.calculateNewReward(msg.sender); } function withdraw() external onlyOwner { require(payable(msg.sender).send(address(this).balance)); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_allTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_allTokensIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"_ownedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_ownedTokensIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"rate","type":"uint256"}],"name":"addCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"baseRates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"collectionAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"}],"name":"getBaseAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBaseRates","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCollectionAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"}],"name":"getStaked","outputs":[{"components":[{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"contractIdx","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"tokenRate","type":"uint256"}],"internalType":"struct Staking.TokenInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"collectionIdx","type":"uint256"}],"name":"getTokenRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"}],"name":"getUnstaked","outputs":[{"components":[{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"contractIdx","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"tokenRate","type":"uint256"}],"internalType":"struct Staking.TokenInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numberOfStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract BUGS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"},{"internalType":"uint256","name":"rate","type":"uint256"}],"name":"setBaseRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"setCollectionAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"baseRate","type":"uint256"}],"name":"setOverrideBaseRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"tokenBaseRates","type":"uint256[]"}],"name":"setOverrideBaseRates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"setRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"collectionIdx","type":"uint256[]"}],"name":"stakeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"collectionIdx","type":"uint256[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c060405273c652c1800e28add44224f2ee0c94cac5e9264e9c608090815273415f65adfa35bc957507944554492c75ff1dc45f60a052620000459060029081620000ea565b506040805180820190915268056bc75e2d631000008152674563918244f4000060208201526200007a90600390600262000154565b503480156200008857600080fd5b5062000094336200009a565b620001b4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805482825590600052602060002090810192821562000142579160200282015b828111156200014257825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200010b565b50620001509291506200019d565b5090565b82805482825590600052602060002090810192821562000142579160200282015b828111156200014257825182906001600160481b031690559160200191906001019062000175565b5b808211156200015057600081556001016200019e565b611f8380620001c46000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80638da5cb5b116100f9578063b34c8afb11610097578063c50f093b11610071578063c50f093b146103f3578063e38a9e2014610408578063f2fde38b1461041b578063f7c618c11461042e57600080fd5b8063b34c8afb146103c4578063bc54ce31146103d7578063bcfcc770146103e057600080fd5b8063aa5965ae116100d3578063aa5965ae14610378578063abae977f1461038b578063b1adb0831461039e578063b27bf7e3146103b157600080fd5b80638da5cb5b14610313578063a2e9b43914610338578063a72636651461035857600080fd5b8063477a791f116101665780636ebcf607116101405780636ebcf607146102c5578063715018a6146102e55780637ff186b4146102ed5780638aee81271461030057600080fd5b8063477a791f1461028c57806358fecb8e1461029f5780636e170022146102b257600080fd5b8063328ac965116101a2578063328ac9651461022e57806333f8051814610243578063399080ec146102645780633ccfd60b1461028457600080fd5b8063150b7a02146101c957806319f101fa146102065780633072d8dc1461021b575b600080fd5b6101e86101d73660046118fb565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b610219610214366004611996565b610441565b005b6102196102293660046119c0565b6104f4565b610236610544565b6040516101fd91906119f3565b6102566102513660046119c0565b6105a6565b6040519081526020016101fd565b610277610272366004611a40565b6105d8565b6040516101fd9190611a8e565b61021961088e565b61027761029a366004611a40565b6108de565b6102196102ad366004611b36565b610ca3565b6102196102c0366004611ba4565b610cf1565b6102566102d3366004611a40565b60076020526000908152604090205481565b610219610f16565b6102566102fb366004611c10565b610f4a565b61021961030e366004611a40565b610f6b565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101fd565b610256610346366004611c10565b60086020526000908152604090205481565b610256610366366004611c10565b600b6020526000908152604090205481565b610256610386366004611c10565b610fb7565b610320610399366004611c10565b610fc7565b6102196103ac366004611ba4565b610ff1565b6102196103bf366004611c29565b61127f565b6102566103d2366004611a40565b6112ef565b61025660095481565b6102196103ee366004611d1c565b61136a565b6103fb611478565b6040516101fd9190611d90565b610256610416366004611b36565b6114cf565b610219610429366004611a40565b611594565b600154610320906001600160a01b031681565b6000546001600160a01b031633146104745760405162461bcd60e51b815260040161046b90611dc8565b60405180910390fd5b6002805460018082019092557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0394909416939093179092556003805492830181556000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910155565b6000546001600160a01b0316331461051e5760405162461bcd60e51b815260040161046b90611dc8565b6001600160a01b0390921660009081526004602090815260408083209383529290522055565b6060600280548060200260200160405190810160405280929190818152602001828054801561059c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161057e575b5050505050905090565b600560205282600052604060002060205281600052604060002081600281106105ce57600080fd5b0154925083915050565b6001600160a01b0381166000908152600760205260408120546060919067ffffffffffffffff81111561060d5761060d611c55565b60405190808252806020026020018201604052801561066957816020015b6106566040518060800160405280606081526020016000815260200160008152602001600081525090565b81526020019060019003908161062b5790505b50905060005b6001600160a01b038416600090815260076020526040902054811015610887576001600160a01b0384166000908152600560209081526040808320848452909152812001548282815181106106c6576106c6611dfd565b6020908102919091018101516040908101929092526001600160a01b038616600090815260058252828120848252909152206001015482828151811061070e5761070e611dfd565b60200260200101516020018181525050600282828151811061073257610732611dfd565b6020026020010151602001518154811061074e5761074e611dfd565b60009182526020909120015482516001600160a01b039091169063c87b56dd9084908490811061078057610780611dfd565b6020026020010151604001516040518263ffffffff1660e01b81526004016107aa91815260200190565b600060405180830381865afa1580156107c7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ef9190810190611e13565b82828151811061080157610801611dfd565b60200260200101516000018190525061085482828151811061082557610825611dfd565b60200260200101516040015183838151811061084357610843611dfd565b6020026020010151602001516114cf565b82828151811061086657610866611dfd565b6020908102919091010151606001528061087f81611ebd565b91505061066f565b5092915050565b6000546001600160a01b031633146108b85760405162461bcd60e51b815260040161046b90611dc8565b60405133904780156108fc02916000818181858888f193505050506108dc57600080fd5b565b60606000805b60025481101561099d5760006002828154811061090357610903611dfd565b6000918252602090912001546040516370a0823160e01b81526001600160a01b038781166004830152909116915081906370a0823190602401602060405180830381865afa158015610959573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097d9190611ed8565b6109879084611ef1565b925050808061099590611ebd565b9150506108e4565b5060008167ffffffffffffffff8111156109b9576109b9611c55565b604051908082528060200260200182016040528015610a1557816020015b610a026040518060800160405280606081526020016000815260200160008152602001600081525090565b8152602001906001900390816109d75790505b5090506000805b600254811015610c9957600060028281548110610a3b57610a3b611dfd565b60009182526020822001546001600160a01b031691505b6040516370a0823160e01b81526001600160a01b0389811660048301528316906370a0823190602401602060405180830381865afa158015610a98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abc9190611ed8565b811015610c8457604051632f745c5960e01b81526001600160a01b0389811660048301526024820183905260009190841690632f745c5990604401602060405180830381865afa158015610b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b389190611ed8565b60405163c87b56dd60e01b8152600481018290529091506001600160a01b0384169063c87b56dd90602401600060405180830381865afa158015610b80573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ba89190810190611e13565b868681518110610bba57610bba611dfd565b60200260200101516000018190525080868681518110610bdc57610bdc611dfd565b6020026020010151604001818152505083868681518110610bff57610bff611dfd565b60200260200101516020018181525050610c42868681518110610c2457610c24611dfd565b60200260200101516040015187878151811061084357610843611dfd565b868681518110610c5457610c54611dfd565b60209081029190910101516060015284610c6d81611ebd565b955050508080610c7c90611ebd565b915050610a52565b50508080610c9190611ebd565b915050610a1c565b5090949350505050565b6000546001600160a01b03163314610ccd5760405162461bcd60e51b815260040161046b90611dc8565b8060038381548110610ce157610ce1611dfd565b6000918252602090912001555050565b828114610d3b5760405162461bcd60e51b8152602060048201526018602482015277082e4e4c2f240d8cadccee8d0e640daeae6e840dac2e8c6d60431b604482015260640161046b565b600154604051636ee14dfb60e01b81523360048201526001600160a01b0390911690636ee14dfb90602401600060405180830381600087803b158015610d8057600080fd5b505af1158015610d94573d6000803e3d6000fd5b5050505060005b83811015610f0f5760006002848484818110610db957610db9611dfd565b9050602002013581548110610dd057610dd0611dfd565b6000918252602090912001546001600160a01b03169050806323b872dd3330898987818110610e0157610e01611dfd565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610e5857600080fd5b505af1158015610e6c573d6000803e3d6000fd5b50505050610eab33878785818110610e8657610e86611dfd565b90506020020135868686818110610e9f57610e9f611dfd565b9050602002013561162f565b3360066000888886818110610ec257610ec2611dfd565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550508080610f0790611ebd565b915050610d9b565b5050505050565b6000546001600160a01b03163314610f405760405162461bcd60e51b815260040161046b90611dc8565b6108dc60006116ee565b60038181548110610f5a57600080fd5b600091825260209091200154905081565b6000546001600160a01b03163314610f955760405162461bcd60e51b815260040161046b90611dc8565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600a8181548110610f5a57600080fd5b60028181548110610fd757600080fd5b6000918252602090912001546001600160a01b0316905081565b82811461103b5760405162461bcd60e51b8152602060048201526018602482015277082e4e4c2f240d8cadccee8d0e640daeae6e840dac2e8c6d60431b604482015260640161046b565b60005b8381101561121b57336006600087878581811061105d5761105d611dfd565b60209081029290920135835250810191909152604001600020546001600160a01b0316146110cd5760405162461bcd60e51b815260206004820152601f60248201527f547279696e6720746f20756e7374616b6520756e6f776e656420746f6b656e00604482015260640161046b565b60028383838181106110e1576110e1611dfd565b90506020020135815481106110f8576110f8611dfd565b6000918252602090912001546001600160a01b03166323b872dd303388888681811061112657611126611dfd565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561117d57600080fd5b505af1158015611191573d6000803e3d6000fd5b505050506111b7338686848181106111ab576111ab611dfd565b9050602002013561173e565b6000600660008787858181106111cf576111cf611dfd565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550808061121390611ebd565b91505061103e565b50600154604051636ee14dfb60e01b81523360048201526001600160a01b0390911690636ee14dfb90602401600060405180830381600087803b15801561126157600080fd5b505af1158015611275573d6000803e3d6000fd5b5050505050505050565b6000546001600160a01b031633146112a95760405162461bcd60e51b815260040161046b90611dc8565b80600283815481106112bd576112bd611dfd565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b600080805b6001600160a01b038416600090815260076020526040902054811015610887576001600160a01b03841660009081526005602090815260408083208484529091529020805460019091015461134982826114cf565b6113539085611ef1565b93505050808061136290611ebd565b9150506112f4565b6000546001600160a01b031633146113945760405162461bcd60e51b815260040161046b90611dc8565b6003548251146113e65760405162461bcd60e51b815260206004820152601e60248201527f417272617973206d757374206265207468652073616d65206c656e6774680000604482015260640161046b565b60005b82518110156114725781818151811061140457611404611dfd565b602002602001015160046000866001600160a01b03166001600160a01b03168152602001908152602001600020600085848151811061144557611445611dfd565b6020026020010151815260200190815260200160002081905550808061146a90611ebd565b9150506113e9565b50505050565b6060600380548060200260200160405190810160405280929190818152602001828054801561059c57602002820191906000526020600020905b8154815260200190600101908083116114b2575050505050905090565b60008060046000600285815481106114e9576114e9611dfd565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120878252909252902054111561156d57600460006002848154811061153657611536611dfd565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120868252909252902054905061158e565b6003828154811061158057611580611dfd565b906000526020600020015490505b92915050565b6000546001600160a01b031633146115be5760405162461bcd60e51b815260040161046b90611dc8565b6001600160a01b0381166116235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161046b565b61162c816116ee565b50565b6001600160a01b038316600081815260076020818152604080842080546005845282862081875284528286208981556001018890558886526008845291852082905594845291905282549092909161168683611ebd565b91905055506116d383600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b600980549060006116e383611ebd565b919050555050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03821660009081526007602052604081205461176390600190611f09565b6000838152600860205260409020549091508082146117c4576001600160a01b038416600090815260056020908152604080832085845282528083208054600191820154868652838620828155909201919091558352600890915290208190555b60008381526008602090815260408083208390556001600160a01b03871680845260058352818420868552835281842084815560010184905583526007909152812080549161181283611f20565b919050555061182083611830565b600980549060006116e383611f20565b600a5460009061184290600190611f09565b6000838152600b6020526040812054600a805493945090928490811061186a5761186a611dfd565b9060005260206000200154905080600a838154811061188b5761188b611dfd565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a8054806118c3576118c3611f37565b6001900381819060005260206000200160009055905550505050565b80356001600160a01b03811681146118f657600080fd5b919050565b60008060008060006080868803121561191357600080fd5b61191c866118df565b945061192a602087016118df565b935060408601359250606086013567ffffffffffffffff8082111561194e57600080fd5b818801915088601f83011261196257600080fd5b81358181111561197157600080fd5b89602082850101111561198357600080fd5b9699959850939650602001949392505050565b600080604083850312156119a957600080fd5b6119b2836118df565b946020939093013593505050565b6000806000606084860312156119d557600080fd5b6119de846118df565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015611a345783516001600160a01b031683529284019291840191600101611a0f565b50909695505050505050565b600060208284031215611a5257600080fd5b611a5b826118df565b9392505050565b60005b83811015611a7d578181015183820152602001611a65565b838111156114725750506000910152565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611b2857603f198984030185528151608081518186528051808388015260a09250611ae9818489018d8501611a62565b838b0151878c0152898401518a880152606093840151938701939093525095880195601f91909101601f19169093019092019190860190600101611ab5565b509098975050505050505050565b60008060408385031215611b4957600080fd5b50508035926020909101359150565b60008083601f840112611b6a57600080fd5b50813567ffffffffffffffff811115611b8257600080fd5b6020830191508360208260051b8501011115611b9d57600080fd5b9250929050565b60008060008060408587031215611bba57600080fd5b843567ffffffffffffffff80821115611bd257600080fd5b611bde88838901611b58565b90965094506020870135915080821115611bf757600080fd5b50611c0487828801611b58565b95989497509550505050565b600060208284031215611c2257600080fd5b5035919050565b60008060408385031215611c3c57600080fd5b82359150611c4c602084016118df565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611c9457611c94611c55565b604052919050565b600082601f830112611cad57600080fd5b8135602067ffffffffffffffff821115611cc957611cc9611c55565b8160051b611cd8828201611c6b565b9283528481018201928281019087851115611cf257600080fd5b83870192505b84831015611d1157823582529183019190830190611cf8565b979650505050505050565b600080600060608486031215611d3157600080fd5b611d3a846118df565b9250602084013567ffffffffffffffff80821115611d5757600080fd5b611d6387838801611c9c565b93506040860135915080821115611d7957600080fd5b50611d8686828701611c9c565b9150509250925092565b6020808252825182820181905260009190848201906040850190845b81811015611a3457835183529284019291840191600101611dac565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611e2557600080fd5b815167ffffffffffffffff80821115611e3d57600080fd5b818401915084601f830112611e5157600080fd5b815181811115611e6357611e63611c55565b611e76601f8201601f1916602001611c6b565b9150808252856020828501011115611e8d57600080fd5b611e9e816020840160208601611a62565b50949350505050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ed157611ed1611ea7565b5060010190565b600060208284031215611eea57600080fd5b5051919050565b60008219821115611f0457611f04611ea7565b500190565b600082821015611f1b57611f1b611ea7565b500390565b600081611f2f57611f2f611ea7565b506000190190565b634e487b7160e01b600052603160045260246000fdfea264697066735822122085713224078078289206842fd74452da82d05d8908d202f1abcc9eca7dad655164736f6c634300080c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80638da5cb5b116100f9578063b34c8afb11610097578063c50f093b11610071578063c50f093b146103f3578063e38a9e2014610408578063f2fde38b1461041b578063f7c618c11461042e57600080fd5b8063b34c8afb146103c4578063bc54ce31146103d7578063bcfcc770146103e057600080fd5b8063aa5965ae116100d3578063aa5965ae14610378578063abae977f1461038b578063b1adb0831461039e578063b27bf7e3146103b157600080fd5b80638da5cb5b14610313578063a2e9b43914610338578063a72636651461035857600080fd5b8063477a791f116101665780636ebcf607116101405780636ebcf607146102c5578063715018a6146102e55780637ff186b4146102ed5780638aee81271461030057600080fd5b8063477a791f1461028c57806358fecb8e1461029f5780636e170022146102b257600080fd5b8063328ac965116101a2578063328ac9651461022e57806333f8051814610243578063399080ec146102645780633ccfd60b1461028457600080fd5b8063150b7a02146101c957806319f101fa146102065780633072d8dc1461021b575b600080fd5b6101e86101d73660046118fb565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b610219610214366004611996565b610441565b005b6102196102293660046119c0565b6104f4565b610236610544565b6040516101fd91906119f3565b6102566102513660046119c0565b6105a6565b6040519081526020016101fd565b610277610272366004611a40565b6105d8565b6040516101fd9190611a8e565b61021961088e565b61027761029a366004611a40565b6108de565b6102196102ad366004611b36565b610ca3565b6102196102c0366004611ba4565b610cf1565b6102566102d3366004611a40565b60076020526000908152604090205481565b610219610f16565b6102566102fb366004611c10565b610f4a565b61021961030e366004611a40565b610f6b565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101fd565b610256610346366004611c10565b60086020526000908152604090205481565b610256610366366004611c10565b600b6020526000908152604090205481565b610256610386366004611c10565b610fb7565b610320610399366004611c10565b610fc7565b6102196103ac366004611ba4565b610ff1565b6102196103bf366004611c29565b61127f565b6102566103d2366004611a40565b6112ef565b61025660095481565b6102196103ee366004611d1c565b61136a565b6103fb611478565b6040516101fd9190611d90565b610256610416366004611b36565b6114cf565b610219610429366004611a40565b611594565b600154610320906001600160a01b031681565b6000546001600160a01b031633146104745760405162461bcd60e51b815260040161046b90611dc8565b60405180910390fd5b6002805460018082019092557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0394909416939093179092556003805492830181556000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910155565b6000546001600160a01b0316331461051e5760405162461bcd60e51b815260040161046b90611dc8565b6001600160a01b0390921660009081526004602090815260408083209383529290522055565b6060600280548060200260200160405190810160405280929190818152602001828054801561059c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161057e575b5050505050905090565b600560205282600052604060002060205281600052604060002081600281106105ce57600080fd5b0154925083915050565b6001600160a01b0381166000908152600760205260408120546060919067ffffffffffffffff81111561060d5761060d611c55565b60405190808252806020026020018201604052801561066957816020015b6106566040518060800160405280606081526020016000815260200160008152602001600081525090565b81526020019060019003908161062b5790505b50905060005b6001600160a01b038416600090815260076020526040902054811015610887576001600160a01b0384166000908152600560209081526040808320848452909152812001548282815181106106c6576106c6611dfd565b6020908102919091018101516040908101929092526001600160a01b038616600090815260058252828120848252909152206001015482828151811061070e5761070e611dfd565b60200260200101516020018181525050600282828151811061073257610732611dfd565b6020026020010151602001518154811061074e5761074e611dfd565b60009182526020909120015482516001600160a01b039091169063c87b56dd9084908490811061078057610780611dfd565b6020026020010151604001516040518263ffffffff1660e01b81526004016107aa91815260200190565b600060405180830381865afa1580156107c7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ef9190810190611e13565b82828151811061080157610801611dfd565b60200260200101516000018190525061085482828151811061082557610825611dfd565b60200260200101516040015183838151811061084357610843611dfd565b6020026020010151602001516114cf565b82828151811061086657610866611dfd565b6020908102919091010151606001528061087f81611ebd565b91505061066f565b5092915050565b6000546001600160a01b031633146108b85760405162461bcd60e51b815260040161046b90611dc8565b60405133904780156108fc02916000818181858888f193505050506108dc57600080fd5b565b60606000805b60025481101561099d5760006002828154811061090357610903611dfd565b6000918252602090912001546040516370a0823160e01b81526001600160a01b038781166004830152909116915081906370a0823190602401602060405180830381865afa158015610959573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097d9190611ed8565b6109879084611ef1565b925050808061099590611ebd565b9150506108e4565b5060008167ffffffffffffffff8111156109b9576109b9611c55565b604051908082528060200260200182016040528015610a1557816020015b610a026040518060800160405280606081526020016000815260200160008152602001600081525090565b8152602001906001900390816109d75790505b5090506000805b600254811015610c9957600060028281548110610a3b57610a3b611dfd565b60009182526020822001546001600160a01b031691505b6040516370a0823160e01b81526001600160a01b0389811660048301528316906370a0823190602401602060405180830381865afa158015610a98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abc9190611ed8565b811015610c8457604051632f745c5960e01b81526001600160a01b0389811660048301526024820183905260009190841690632f745c5990604401602060405180830381865afa158015610b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b389190611ed8565b60405163c87b56dd60e01b8152600481018290529091506001600160a01b0384169063c87b56dd90602401600060405180830381865afa158015610b80573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ba89190810190611e13565b868681518110610bba57610bba611dfd565b60200260200101516000018190525080868681518110610bdc57610bdc611dfd565b6020026020010151604001818152505083868681518110610bff57610bff611dfd565b60200260200101516020018181525050610c42868681518110610c2457610c24611dfd565b60200260200101516040015187878151811061084357610843611dfd565b868681518110610c5457610c54611dfd565b60209081029190910101516060015284610c6d81611ebd565b955050508080610c7c90611ebd565b915050610a52565b50508080610c9190611ebd565b915050610a1c565b5090949350505050565b6000546001600160a01b03163314610ccd5760405162461bcd60e51b815260040161046b90611dc8565b8060038381548110610ce157610ce1611dfd565b6000918252602090912001555050565b828114610d3b5760405162461bcd60e51b8152602060048201526018602482015277082e4e4c2f240d8cadccee8d0e640daeae6e840dac2e8c6d60431b604482015260640161046b565b600154604051636ee14dfb60e01b81523360048201526001600160a01b0390911690636ee14dfb90602401600060405180830381600087803b158015610d8057600080fd5b505af1158015610d94573d6000803e3d6000fd5b5050505060005b83811015610f0f5760006002848484818110610db957610db9611dfd565b9050602002013581548110610dd057610dd0611dfd565b6000918252602090912001546001600160a01b03169050806323b872dd3330898987818110610e0157610e01611dfd565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610e5857600080fd5b505af1158015610e6c573d6000803e3d6000fd5b50505050610eab33878785818110610e8657610e86611dfd565b90506020020135868686818110610e9f57610e9f611dfd565b9050602002013561162f565b3360066000888886818110610ec257610ec2611dfd565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550508080610f0790611ebd565b915050610d9b565b5050505050565b6000546001600160a01b03163314610f405760405162461bcd60e51b815260040161046b90611dc8565b6108dc60006116ee565b60038181548110610f5a57600080fd5b600091825260209091200154905081565b6000546001600160a01b03163314610f955760405162461bcd60e51b815260040161046b90611dc8565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600a8181548110610f5a57600080fd5b60028181548110610fd757600080fd5b6000918252602090912001546001600160a01b0316905081565b82811461103b5760405162461bcd60e51b8152602060048201526018602482015277082e4e4c2f240d8cadccee8d0e640daeae6e840dac2e8c6d60431b604482015260640161046b565b60005b8381101561121b57336006600087878581811061105d5761105d611dfd565b60209081029290920135835250810191909152604001600020546001600160a01b0316146110cd5760405162461bcd60e51b815260206004820152601f60248201527f547279696e6720746f20756e7374616b6520756e6f776e656420746f6b656e00604482015260640161046b565b60028383838181106110e1576110e1611dfd565b90506020020135815481106110f8576110f8611dfd565b6000918252602090912001546001600160a01b03166323b872dd303388888681811061112657611126611dfd565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561117d57600080fd5b505af1158015611191573d6000803e3d6000fd5b505050506111b7338686848181106111ab576111ab611dfd565b9050602002013561173e565b6000600660008787858181106111cf576111cf611dfd565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550808061121390611ebd565b91505061103e565b50600154604051636ee14dfb60e01b81523360048201526001600160a01b0390911690636ee14dfb90602401600060405180830381600087803b15801561126157600080fd5b505af1158015611275573d6000803e3d6000fd5b5050505050505050565b6000546001600160a01b031633146112a95760405162461bcd60e51b815260040161046b90611dc8565b80600283815481106112bd576112bd611dfd565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b600080805b6001600160a01b038416600090815260076020526040902054811015610887576001600160a01b03841660009081526005602090815260408083208484529091529020805460019091015461134982826114cf565b6113539085611ef1565b93505050808061136290611ebd565b9150506112f4565b6000546001600160a01b031633146113945760405162461bcd60e51b815260040161046b90611dc8565b6003548251146113e65760405162461bcd60e51b815260206004820152601e60248201527f417272617973206d757374206265207468652073616d65206c656e6774680000604482015260640161046b565b60005b82518110156114725781818151811061140457611404611dfd565b602002602001015160046000866001600160a01b03166001600160a01b03168152602001908152602001600020600085848151811061144557611445611dfd565b6020026020010151815260200190815260200160002081905550808061146a90611ebd565b9150506113e9565b50505050565b6060600380548060200260200160405190810160405280929190818152602001828054801561059c57602002820191906000526020600020905b8154815260200190600101908083116114b2575050505050905090565b60008060046000600285815481106114e9576114e9611dfd565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120878252909252902054111561156d57600460006002848154811061153657611536611dfd565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120868252909252902054905061158e565b6003828154811061158057611580611dfd565b906000526020600020015490505b92915050565b6000546001600160a01b031633146115be5760405162461bcd60e51b815260040161046b90611dc8565b6001600160a01b0381166116235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161046b565b61162c816116ee565b50565b6001600160a01b038316600081815260076020818152604080842080546005845282862081875284528286208981556001018890558886526008845291852082905594845291905282549092909161168683611ebd565b91905055506116d383600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b600980549060006116e383611ebd565b919050555050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03821660009081526007602052604081205461176390600190611f09565b6000838152600860205260409020549091508082146117c4576001600160a01b038416600090815260056020908152604080832085845282528083208054600191820154868652838620828155909201919091558352600890915290208190555b60008381526008602090815260408083208390556001600160a01b03871680845260058352818420868552835281842084815560010184905583526007909152812080549161181283611f20565b919050555061182083611830565b600980549060006116e383611f20565b600a5460009061184290600190611f09565b6000838152600b6020526040812054600a805493945090928490811061186a5761186a611dfd565b9060005260206000200154905080600a838154811061188b5761188b611dfd565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a8054806118c3576118c3611f37565b6001900381819060005260206000200160009055905550505050565b80356001600160a01b03811681146118f657600080fd5b919050565b60008060008060006080868803121561191357600080fd5b61191c866118df565b945061192a602087016118df565b935060408601359250606086013567ffffffffffffffff8082111561194e57600080fd5b818801915088601f83011261196257600080fd5b81358181111561197157600080fd5b89602082850101111561198357600080fd5b9699959850939650602001949392505050565b600080604083850312156119a957600080fd5b6119b2836118df565b946020939093013593505050565b6000806000606084860312156119d557600080fd5b6119de846118df565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015611a345783516001600160a01b031683529284019291840191600101611a0f565b50909695505050505050565b600060208284031215611a5257600080fd5b611a5b826118df565b9392505050565b60005b83811015611a7d578181015183820152602001611a65565b838111156114725750506000910152565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611b2857603f198984030185528151608081518186528051808388015260a09250611ae9818489018d8501611a62565b838b0151878c0152898401518a880152606093840151938701939093525095880195601f91909101601f19169093019092019190860190600101611ab5565b509098975050505050505050565b60008060408385031215611b4957600080fd5b50508035926020909101359150565b60008083601f840112611b6a57600080fd5b50813567ffffffffffffffff811115611b8257600080fd5b6020830191508360208260051b8501011115611b9d57600080fd5b9250929050565b60008060008060408587031215611bba57600080fd5b843567ffffffffffffffff80821115611bd257600080fd5b611bde88838901611b58565b90965094506020870135915080821115611bf757600080fd5b50611c0487828801611b58565b95989497509550505050565b600060208284031215611c2257600080fd5b5035919050565b60008060408385031215611c3c57600080fd5b82359150611c4c602084016118df565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611c9457611c94611c55565b604052919050565b600082601f830112611cad57600080fd5b8135602067ffffffffffffffff821115611cc957611cc9611c55565b8160051b611cd8828201611c6b565b9283528481018201928281019087851115611cf257600080fd5b83870192505b84831015611d1157823582529183019190830190611cf8565b979650505050505050565b600080600060608486031215611d3157600080fd5b611d3a846118df565b9250602084013567ffffffffffffffff80821115611d5757600080fd5b611d6387838801611c9c565b93506040860135915080821115611d7957600080fd5b50611d8686828701611c9c565b9150509250925092565b6020808252825182820181905260009190848201906040850190845b81811015611a3457835183529284019291840191600101611dac565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611e2557600080fd5b815167ffffffffffffffff80821115611e3d57600080fd5b818401915084601f830112611e5157600080fd5b815181811115611e6357611e63611c55565b611e76601f8201601f1916602001611c6b565b9150808252856020828501011115611e8d57600080fd5b611e9e816020840160208601611a62565b50949350505050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ed157611ed1611ea7565b5060010190565b600060208284031215611eea57600080fd5b5051919050565b60008219821115611f0457611f04611ea7565b500190565b600082821015611f1b57611f1b611ea7565b500390565b600081611f2f57611f2f611ea7565b506000190190565b634e487b7160e01b600052603160045260246000fdfea264697066735822122085713224078078289206842fd74452da82d05d8908d202f1abcc9eca7dad655164736f6c634300080c0033
Deployed Bytecode Sourcemap
73297:10069:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;75346:192;;;;;;:::i;:::-;-1:-1:-1;;;75346:192:0;;;;;;;;;;;-1:-1:-1;;;;;;1167:33:1;;;1149:52;;1137:2;1122:18;75346:192:0;;;;;;;;75166:172;;;;;;:::i;:::-;;:::i;:::-;;74365:170;;;;;;:::i;:::-;;:::i;75546:118::-;;;:::i;:::-;;;;;;;:::i;73939:70::-;;;;;;:::i;:::-;;:::i;:::-;;;2607:25:1;;;2595:2;2580:18;73939:70:0;2461:177:1;80533:654:0;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;83249:114::-;;;:::i;79247:1228::-;;;;;;:::i;:::-;;:::i;75051:107::-;;;;;;:::i;:::-;;:::i;81912:631::-;;;;;;:::i;:::-;;:::i;74058:44::-;;;;;;:::i;:::-;;;;;;;;;;;;;;17913:103;;;:::i;73735:51::-;;;;;;:::i;:::-;;:::i;81195:116::-;;;;;;:::i;:::-;;:::i;17262:87::-;17308:7;17335:6;-1:-1:-1;;;;;17335:6:0;17262:87;;;-1:-1:-1;;;;;6260:32:1;;;6242:51;;6230:2;6215:18;17262:87:0;6096:203:1;74175:52:0;;;;;;:::i;:::-;;;;;;;;;;;;;;74306:50;;;;;;:::i;:::-;;;;;;;;;;;;;;74272:27;;;;;;:::i;:::-;;:::i;73553:173::-;;;;;;:::i;:::-;;:::i;82613:628::-;;;;;;:::i;:::-;;:::i;74921:122::-;;;;;;:::i;:::-;;:::i;81440:402::-;;;;;;:::i;:::-;;:::i;74234:29::-;;;;;;74543:370;;;;;;:::i;:::-;;:::i;75672:98::-;;;:::i;:::-;;;;;;;:::i;78777:340::-;;;;;;:::i;:::-;;:::i;18171:201::-;;;;;;:::i;:::-;;:::i;73383:23::-;;;;;-1:-1:-1;;;;;73383:23:0;;;75166:172;17308:7;17335:6;-1:-1:-1;;;;;17335:6:0;16066:10;17482:23;17474:68;;;;-1:-1:-1;;;17474:68:0;;;;;;;:::i;:::-;;;;;;;;;75258:19:::1;:41:::0;;::::1;::::0;;::::1;::::0;;;;::::1;::::0;;-1:-1:-1;;;;;;75258:41:0::1;-1:-1:-1::0;;;;;75258:41:0;;;::::1;::::0;;;::::1;::::0;;;75310:9:::1;:20:::0;;;;::::1;::::0;;-1:-1:-1;75310:20:0;;;;::::1;::::0;75166:172::o;74365:170::-;17308:7;17335:6;-1:-1:-1;;;;;17335:6:0;16066:10;17482:23;17474:68;;;;-1:-1:-1;;;17474:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;74479:28:0;;::::1;;::::0;;;:16:::1;:28;::::0;;;;;;;:37;;;;;;;:48;74365:170::o;75546:118::-;75601:16;75637:19;75630:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;75630:26:0;;;;;;;;;;;;;;;;;;;;;;;75546:118;:::o;73939:70::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;73939:70:0;;-1:-1:-1;;73939:70:0:o;80533:654::-;-1:-1:-1;;;;;80676:24:0;;80629:28;80676:24;;;:9;:24;;;;;;80598:18;;80629:28;80660:41;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;80660:41:0;;;;;;;;;;;;;;;;;80629:72;;80717:9;80713:440;-1:-1:-1;;;;;80736:24:0;;;;;;:9;:24;;;;;;80732:28;;80713:440;;;-1:-1:-1;;;;;80804:27:0;;;;;;:12;:27;;;;;;;;:30;;;;;;;;:33;;80781:9;80791:1;80781:12;;;;;;;;:::i;:::-;;;;;;;;;;;;:20;;;;:56;;;;-1:-1:-1;;;;;80879:27:0;;;;;;:12;:27;;;;;:30;;;;;;;80910:1;80879:33;;80852:9;80862:1;80852:12;;;;;;;;:::i;:::-;;;;;;;:24;;:60;;;;;80963:19;80983:9;80993:1;80983:12;;;;;;;;:::i;:::-;;;;;;;:24;;;80963:45;;;;;;;;:::i;:::-;;;;;;;;;;;81019:12;;-1:-1:-1;;;;;80963:45:0;;;;80946:72;;81019:9;;81029:1;;81019:12;;;;;;:::i;:::-;;;;;;;:20;;;80946:94;;;;;;;;;;;;;2607:25:1;;2595:2;2580:18;;2461:177;80946:94:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;80946:94:0;;;;;;;;;;;;:::i;:::-;80927:9;80937:1;80927:12;;;;;;;;:::i;:::-;;;;;;;:16;;:113;;;;81080:61;81093:9;81103:1;81093:12;;;;;;;;:::i;:::-;;;;;;;:20;;;81115:9;81125:1;81115:12;;;;;;;;:::i;:::-;;;;;;;:24;;;81080:12;:61::i;:::-;81055:9;81065:1;81055:12;;;;;;;;:::i;:::-;;;;;;;;;;;:22;;:86;80762:3;;;;:::i;:::-;;;;80713:440;;;-1:-1:-1;81170:9:0;80533:654;-1:-1:-1;;80533:654:0:o;83249:114::-;17308:7;17335:6;-1:-1:-1;;;;;17335:6:0;16066:10;17482:23;17474:68;;;;-1:-1:-1;;;17474:68:0;;;;;;;:::i;:::-;83307:47:::1;::::0;83315:10:::1;::::0;83332:21:::1;83307:47:::0;::::1;;;::::0;::::1;::::0;;;83332:21;83315:10;83307:47;::::1;;;;;;83299:56;;;::::0;::::1;;83249:114::o:0;79247:1228::-;79311:18;79342:20;79381:9;79377:234;79400:19;:26;79396:30;;79377:234;;;79447:35;79502:19;79522:1;79502:22;;;;;;;;:::i;:::-;;;;;;;;;;;79556:43;;-1:-1:-1;;;79556:43:0;;-1:-1:-1;;;;;6260:32:1;;;79556:43:0;;;6242:51:1;79502:22:0;;;;-1:-1:-1;79502:22:0;;79556:28;;6215:18:1;;79556:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;79540:59;;;;:::i;:::-;;;79432:179;79428:3;;;;;:::i;:::-;;;;79377:234;;;;79623:28;79670:12;79654:29;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;79654:29:0;;;;;;;;;;;;;;;;;79623:60;;79694:18;79731:9;79727:714;79750:19;:26;79746:30;;79727:714;;;79797:35;79852:19;79872:1;79852:22;;;;;;;;:::i;:::-;;;;;;;;;;-1:-1:-1;;;;;79852:22:0;;-1:-1:-1;79890:540:0;79913:43;;-1:-1:-1;;;79913:43:0;;-1:-1:-1;;;;;6260:32:1;;;79913:43:0;;;6242:51:1;79913:28:0;;;;;6215:18:1;;79913:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;79909:1;:47;79890:540;;;79999:56;;-1:-1:-1;;;79999:56:0;;-1:-1:-1;;;;;11214:32:1;;;79999:56:0;;;11196:51:1;11263:18;;;11256:34;;;79981:15:0;;79999:38;;;;;;11169:18:1;;79999:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;80102:36;;-1:-1:-1;;;80102:36:0;;;;;2607:25:1;;;79981:74:0;;-1:-1:-1;;;;;;80102:27:0;;;;;2580:18:1;;80102:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;80102:36:0;;;;;;;;;;;;:::i;:::-;80074:9;80084:10;80074:21;;;;;;;;:::i;:::-;;;;;;;:25;;:64;;;;80189:7;80157:9;80167:10;80157:21;;;;;;;;:::i;:::-;;;;;;;:29;;:39;;;;;80251:1;80215:9;80225:10;80215:21;;;;;;;;:::i;:::-;;;;;;;:33;;:37;;;;;80305:78;80318:9;80328:10;80318:21;;;;;;;;:::i;:::-;;;;;;;:29;;;80349:9;80359:10;80349:21;;;;;;;;:::i;80305:78::-;80271:9;80281:10;80271:21;;;;;;;;:::i;:::-;;;;;;;;;;;:31;;:112;80402:12;;;;:::i;:::-;;;;79962:468;79958:3;;;;;:::i;:::-;;;;79890:540;;;;79782:659;79778:3;;;;;:::i;:::-;;;;79727:714;;;-1:-1:-1;80458:9:0;;79247:1228;-1:-1:-1;;;;79247:1228:0:o;75051:107::-;17308:7;17335:6;-1:-1:-1;;;;;17335:6:0;16066:10;17482:23;17474:68;;;;-1:-1:-1;;;17474:68:0;;;;;;;:::i;:::-;75146:4:::1;75129:9;75139:3;75129:14;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;:21:::0;-1:-1:-1;;75051:107:0:o;81912:631::-;82021:39;;;82013:76;;;;-1:-1:-1;;;82013:76:0;;11503:2:1;82013:76:0;;;11485:21:1;11542:2;11522:18;;;11515:30;-1:-1:-1;;;11561:18:1;;;11554:54;11625:18;;82013:76:0;11301:348:1;82013:76:0;82100:11;;:42;;-1:-1:-1;;;82100:42:0;;82131:10;82100:42;;;6242:51:1;-1:-1:-1;;;;;82100:11:0;;;;:30;;6215:18:1;;82100:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;82157:9;82153:383;82172:19;;;82153:383;;;82212:35;82267:19;82287:13;;82301:1;82287:16;;;;;;;:::i;:::-;;;;;;;82267:37;;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;82267:37:0;;-1:-1:-1;82267:37:0;82320:31;82352:10;82372:4;82379:8;;82388:1;82379:11;;;;;;;:::i;:::-;82320:71;;-1:-1:-1;;;;;;82320:71:0;;;;;;;-1:-1:-1;;;;;11912:15:1;;;82320:71:0;;;11894:34:1;11964:15;;;;11944:18;;;11937:43;-1:-1:-1;82379:11:0;;;;;;11996:18:1;;;11989:34;11829:18;;82320:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;82406:70;82434:10;82446:8;;82455:1;82446:11;;;;;;;:::i;:::-;;;;;;;82459:13;;82473:1;82459:16;;;;;;;:::i;:::-;;;;;;;82406:27;:70::i;:::-;82514:10;82491:7;:20;82499:8;;82508:1;82499:11;;;;;;;:::i;:::-;;;;;;;82491:20;;;;;;;;;;;;:33;;;;;-1:-1:-1;;;;;82491:33:0;;;;;-1:-1:-1;;;;;82491:33:0;;;;;;82197:339;82193:3;;;;;:::i;:::-;;;;82153:383;;;;81912:631;;;;:::o;17913:103::-;17308:7;17335:6;-1:-1:-1;;;;;17335:6:0;16066:10;17482:23;17474:68;;;;-1:-1:-1;;;17474:68:0;;;;;;;:::i;:::-;17978:30:::1;18005:1;17978:18;:30::i;73735:51::-:0;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;73735:51:0;:::o;81195:116::-;17308:7;17335:6;-1:-1:-1;;;;;17335:6:0;16066:10;17482:23;17474:68;;;;-1:-1:-1;;;17474:68:0;;;;;;;:::i;:::-;81271:11:::1;:32:::0;;-1:-1:-1;;;;;;81271:32:0::1;-1:-1:-1::0;;;;;81271:32:0;;;::::1;::::0;;;::::1;::::0;;81195:116::o;74272:27::-;;;;;;;;;;;;73553:173;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;73553:173:0;;-1:-1:-1;73553:173:0;:::o;82613:628::-;82719:39;;;82711:76;;;;-1:-1:-1;;;82711:76:0;;11503:2:1;82711:76:0;;;11485:21:1;11542:2;11522:18;;;11515:30;-1:-1:-1;;;11561:18:1;;;11554:54;11625:18;;82711:76:0;11301:348:1;82711:76:0;82802:9;82798:383;82817:19;;;82798:383;;;82889:10;82865:7;:20;82873:8;;82882:1;82873:11;;;;;;;:::i;:::-;;;;;;;;;;82865:20;;-1:-1:-1;82865:20:0;;;;;;;;-1:-1:-1;82865:20:0;;-1:-1:-1;;;;;82865:20:0;:34;82857:78;;;;-1:-1:-1;;;82857:78:0;;12236:2:1;82857:78:0;;;12218:21:1;12275:2;12255:18;;;12248:30;12314:33;12294:18;;;12287:61;12365:18;;82857:78:0;12034:355:1;82857:78:0;82958:19;82978:13;;82992:1;82978:16;;;;;;;:::i;:::-;;;;;;;82958:37;;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;82958:37:0;82950:59;83018:4;83025:10;83037:8;;83046:1;83037:11;;;;;;;:::i;:::-;82950:99;;-1:-1:-1;;;;;;82950:99:0;;;;;;;-1:-1:-1;;;;;11912:15:1;;;82950:99:0;;;11894:34:1;11964:15;;;;11944:18;;;11937:43;-1:-1:-1;83037:11:0;;;;;;11996:18:1;;;11989:34;11829:18;;82950:99:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83064:57;83097:10;83109:8;;83118:1;83109:11;;;;;;;:::i;:::-;;;;;;;83064:32;:57::i;:::-;83167:1;83136:7;:20;83144:8;;83153:1;83144:11;;;;;;;:::i;:::-;;;;;;;83136:20;;;;;;;;;;;;:33;;;;;-1:-1:-1;;;;;83136:33:0;;;;;-1:-1:-1;;;;;83136:33:0;;;;;;82838:3;;;;;:::i;:::-;;;;82798:383;;;-1:-1:-1;83191:11:0;;:42;;-1:-1:-1;;;83191:42:0;;83222:10;83191:42;;;6242:51:1;-1:-1:-1;;;;;83191:11:0;;;;:30;;6215:18:1;;83191:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;82613:628;;;;:::o;74921:122::-;17308:7;17335:6;-1:-1:-1;;;;;17335:6:0;16066:10;17482:23;17474:68;;;;-1:-1:-1;;;17474:68:0;;;;;;;:::i;:::-;75033:2:::1;75006:19;75026:3;75006:24;;;;;;;;:::i;:::-;;;;;;;;;:29;;;;;-1:-1:-1::0;;;;;75006:29:0::1;;;;;-1:-1:-1::0;;;;;75006:29:0::1;;;;;;74921:122:::0;;:::o;81440:402::-;81507:7;;;81553:261;-1:-1:-1;;;;;81576:24:0;;;;;;:9;:24;;;;;;81572:28;;81553:261;;;-1:-1:-1;;;;;81639:27:0;;81621:15;81639:27;;;:12;:27;;;;;;;;:30;;;;;;;;:33;;81742:1;81711:33;;;;81766:36;81639:33;81711;81766:12;:36::i;:::-;81759:43;;;;:::i;:::-;;;81606:208;;81602:3;;;;;:::i;:::-;;;;81553:261;;74543:370;17308:7;17335:6;-1:-1:-1;;;;;17335:6:0;16066:10;17482:23;17474:68;;;;-1:-1:-1;;;17474:68:0;;;;;;;:::i;:::-;74710:9:::1;:16:::0;74691:15;;:35:::1;74683:78;;;::::0;-1:-1:-1;;;74683:78:0;;12596:2:1;74683:78:0::1;::::0;::::1;12578:21:1::0;12635:2;12615:18;;;12608:30;12674:32;12654:18;;;12647:60;12724:18;;74683:78:0::1;12394:354:1::0;74683:78:0::1;74777:9;74772:134;74796:8;:15;74792:1;:19;74772:134;;;74877:14;74892:1;74877:17;;;;;;;;:::i;:::-;;;;;;;74833:16;:28;74850:10;-1:-1:-1::0;;;;;74833:28:0::1;-1:-1:-1::0;;;;;74833:28:0::1;;;;;;;;;;;;:41;74862:8;74871:1;74862:11;;;;;;;;:::i;:::-;;;;;;;74833:41;;;;;;;;;;;:61;;;;74813:3;;;;;:::i;:::-;;;;74772:134;;;;74543:370:::0;;;:::o;75672:98::-;75717:16;75753:9;75746:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;75672:98;:::o;78777:340::-;78860:7;78948:1;78884:16;:52;78901:19;78921:13;78901:34;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;78901:34:0;78884:52;;;;;;;;;;;;;;;:61;;;;;;;;;:65;78880:230;;;78973:16;:52;78990:19;79010:13;78990:34;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;78990:34:0;78973:52;;;;;;;;;;;;;;;:61;;;;;;;;;;-1:-1:-1;78966:68:0;;78880:230;79074:9;79084:13;79074:24;;;;;;;;:::i;:::-;;;;;;;;;79067:31;;78880:230;78777:340;;;;:::o;18171:201::-;17308:7;17335:6;-1:-1:-1;;;;;17335:6:0;16066:10;17482:23;17474:68;;;;-1:-1:-1;;;17474:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;18260:22:0;::::1;18252:73;;;::::0;-1:-1:-1;;;18252:73:0;;12955:2:1;18252:73:0::1;::::0;::::1;12937:21:1::0;12994:2;12974:18;;;12967:30;13033:34;13013:18;;;13006:62;-1:-1:-1;;;13084:18:1;;;13077:36;13130:19;;18252:73:0::1;12753:402:1::0;18252:73:0::1;18336:28;18355:8;18336:18;:28::i;:::-;18171:201:::0;:::o;77109:398::-;-1:-1:-1;;;;;77234:13:0;;77217:14;77234:13;;;:9;:13;;;;;;;;;;77258:12;:16;;;;;:24;;;;;;;;:37;;;77331:1;77306:27;:43;;;77360:26;;;:17;:26;;;;;:35;;;77406:13;;;;;;:15;;77234:13;;77406:15;;;;;:::i;:::-;;;;;;77432:40;77464:7;75954:10;:17;;75927:24;;;;:15;:24;;;;;:44;;;75982:24;;;;;;;;;;;;75850:164;77432:40;77483:14;:16;;;:14;:16;;;:::i;:::-;;;;;;77206:301;77109:398;;;:::o;18532:191::-;18606:16;18625:6;;-1:-1:-1;;;;;18642:17:0;;;-1:-1:-1;;;;;;18642:17:0;;;;;;18675:40;;18625:6;;;;;;;18675:40;;18606:16;18675:40;18595:128;18532:191;:::o;77515:1252::-;-1:-1:-1;;;;;77806:15:0;;77781:22;77806:15;;;:9;:15;;;;;;:19;;77824:1;;77806:19;:::i;:::-;77836:18;77857:26;;;:17;:26;;;;;;77781:44;;-1:-1:-1;77990:28:0;;;77986:488;;-1:-1:-1;;;;;78057:18:0;;78035:19;78057:18;;;:12;:18;;;;;;;;:34;;;;;;;;:37;;78175:1;78140:37;;;;78194:30;;;;;;:47;;;78314:33;;;:56;;;;78385:30;;:17;:30;;;;;:43;;;77986:488;78570:26;;;;:17;:26;;;;;;;;78563:33;;;-1:-1:-1;;;;;78614:18:0;;;;;:12;:18;;;;;:34;;;;;;;;-1:-1:-1;;;;;;;;78659:15:0;;:9;:15;;;;;:17;;;;;;:::i;:::-;;;;;;78687:45;78724:7;78687:36;:45::i;:::-;78743:14;:16;;;:14;:16;;;:::i;76022:1079::-;76300:10;:17;76275:22;;76300:21;;76320:1;;76300:21;:::i;:::-;76332:18;76353:24;;;:15;:24;;;;;;76726:10;:26;;76275:46;;-1:-1:-1;76353:24:0;;76275:46;;76726:26;;;;;;:::i;:::-;;;;;;;;;76704:48;;76790:11;76765:10;76776;76765:22;;;;;;;;:::i;:::-;;;;;;;;;;;;:36;;;;76870:28;;;:15;:28;;;;;;;:41;;;77042:24;;;;;77035:31;77077:10;:16;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;76093:1008;;;76022:1079;:::o;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:808::-;289:6;297;305;313;321;374:3;362:9;353:7;349:23;345:33;342:53;;;391:1;388;381:12;342:53;414:29;433:9;414:29;:::i;:::-;404:39;;462:38;496:2;485:9;481:18;462:38;:::i;:::-;452:48;;547:2;536:9;532:18;519:32;509:42;;602:2;591:9;587:18;574:32;625:18;666:2;658:6;655:14;652:34;;;682:1;679;672:12;652:34;720:6;709:9;705:22;695:32;;765:7;758:4;754:2;750:13;746:27;736:55;;787:1;784;777:12;736:55;827:2;814:16;853:2;845:6;842:14;839:34;;;869:1;866;859:12;839:34;914:7;909:2;900:6;896:2;892:15;888:24;885:37;882:57;;;935:1;932;925:12;882:57;192:808;;;;-1:-1:-1;192:808:1;;-1:-1:-1;966:2:1;958:11;;988:6;192:808;-1:-1:-1;;;192:808:1:o;1212:254::-;1280:6;1288;1341:2;1329:9;1320:7;1316:23;1312:32;1309:52;;;1357:1;1354;1347:12;1309:52;1380:29;1399:9;1380:29;:::i;:::-;1370:39;1456:2;1441:18;;;;1428:32;;-1:-1:-1;;;1212:254:1:o;1471:322::-;1548:6;1556;1564;1617:2;1605:9;1596:7;1592:23;1588:32;1585:52;;;1633:1;1630;1623:12;1585:52;1656:29;1675:9;1656:29;:::i;:::-;1646:39;1732:2;1717:18;;1704:32;;-1:-1:-1;1783:2:1;1768:18;;;1755:32;;1471:322;-1:-1:-1;;;1471:322:1:o;1798:658::-;1969:2;2021:21;;;2091:13;;1994:18;;;2113:22;;;1940:4;;1969:2;2192:15;;;;2166:2;2151:18;;;1940:4;2235:195;2249:6;2246:1;2243:13;2235:195;;;2314:13;;-1:-1:-1;;;;;2310:39:1;2298:52;;2405:15;;;;2370:12;;;;2346:1;2264:9;2235:195;;;-1:-1:-1;2447:3:1;;1798:658;-1:-1:-1;;;;;;1798:658:1:o;2643:186::-;2702:6;2755:2;2743:9;2734:7;2730:23;2726:32;2723:52;;;2771:1;2768;2761:12;2723:52;2794:29;2813:9;2794:29;:::i;:::-;2784:39;2643:186;-1:-1:-1;;;2643:186:1:o;2834:258::-;2906:1;2916:113;2930:6;2927:1;2924:13;2916:113;;;3006:11;;;3000:18;2987:11;;;2980:39;2952:2;2945:10;2916:113;;;3047:6;3044:1;3041:13;3038:48;;;-1:-1:-1;;3082:1:1;3064:16;;3057:27;2834:258::o;3097:1406::-;3293:4;3322:2;3362;3351:9;3347:18;3392:2;3381:9;3374:21;3415:6;3450;3444:13;3481:6;3473;3466:22;3507:2;3497:12;;3540:2;3529:9;3525:18;3518:25;;3602:2;3592:6;3589:1;3585:14;3574:9;3570:30;3566:39;3640:2;3632:6;3628:15;3661:1;3671:803;3685:6;3682:1;3679:13;3671:803;;;3778:2;3774:7;3762:9;3754:6;3750:22;3746:36;3741:3;3734:49;3812:6;3806:13;3842:4;3885:2;3879:9;3916:2;3908:6;3901:18;3954:12;3948:19;4004:8;3999:2;3991:6;3987:15;3980:33;4036:3;4026:13;;4052:71;4114:8;4109:2;4101:6;4097:15;4092:2;4078:12;4074:21;4052:71;:::i;:::-;4166:11;;;4160:18;4143:15;;;4136:43;4222:11;;;4216:18;4199:15;;;4192:43;4258:4;4305:11;;;4299:18;4282:15;;;4275:43;;;;-1:-1:-1;4452:12:1;;;;4384:2;4361:17;;;;-1:-1:-1;;4357:31:1;4345:44;;;4341:53;;;;4417:15;;;;3707:1;3700:9;3671:803;;;-1:-1:-1;4491:6:1;;3097:1406;-1:-1:-1;;;;;;;;3097:1406:1:o;4508:248::-;4576:6;4584;4637:2;4625:9;4616:7;4612:23;4608:32;4605:52;;;4653:1;4650;4643:12;4605:52;-1:-1:-1;;4676:23:1;;;4746:2;4731:18;;;4718:32;;-1:-1:-1;4508:248:1:o;4761:367::-;4824:8;4834:6;4888:3;4881:4;4873:6;4869:17;4865:27;4855:55;;4906:1;4903;4896:12;4855:55;-1:-1:-1;4929:20:1;;4972:18;4961:30;;4958:50;;;5004:1;5001;4994:12;4958:50;5041:4;5033:6;5029:17;5017:29;;5101:3;5094:4;5084:6;5081:1;5077:14;5069:6;5065:27;5061:38;5058:47;5055:67;;;5118:1;5115;5108:12;5055:67;4761:367;;;;;:::o;5133:773::-;5255:6;5263;5271;5279;5332:2;5320:9;5311:7;5307:23;5303:32;5300:52;;;5348:1;5345;5338:12;5300:52;5388:9;5375:23;5417:18;5458:2;5450:6;5447:14;5444:34;;;5474:1;5471;5464:12;5444:34;5513:70;5575:7;5566:6;5555:9;5551:22;5513:70;:::i;:::-;5602:8;;-1:-1:-1;5487:96:1;-1:-1:-1;5690:2:1;5675:18;;5662:32;;-1:-1:-1;5706:16:1;;;5703:36;;;5735:1;5732;5725:12;5703:36;;5774:72;5838:7;5827:8;5816:9;5812:24;5774:72;:::i;:::-;5133:773;;;;-1:-1:-1;5865:8:1;-1:-1:-1;;;;5133:773:1:o;5911:180::-;5970:6;6023:2;6011:9;6002:7;5998:23;5994:32;5991:52;;;6039:1;6036;6029:12;5991:52;-1:-1:-1;6062:23:1;;5911:180;-1:-1:-1;5911:180:1:o;6304:254::-;6372:6;6380;6433:2;6421:9;6412:7;6408:23;6404:32;6401:52;;;6449:1;6446;6439:12;6401:52;6485:9;6472:23;6462:33;;6514:38;6548:2;6537:9;6533:18;6514:38;:::i;:::-;6504:48;;6304:254;;;;;:::o;6563:127::-;6624:10;6619:3;6615:20;6612:1;6605:31;6655:4;6652:1;6645:15;6679:4;6676:1;6669:15;6695:275;6766:2;6760:9;6831:2;6812:13;;-1:-1:-1;;6808:27:1;6796:40;;6866:18;6851:34;;6887:22;;;6848:62;6845:88;;;6913:18;;:::i;:::-;6949:2;6942:22;6695:275;;-1:-1:-1;6695:275:1:o;6975:712::-;7029:5;7082:3;7075:4;7067:6;7063:17;7059:27;7049:55;;7100:1;7097;7090:12;7049:55;7136:6;7123:20;7162:4;7185:18;7181:2;7178:26;7175:52;;;7207:18;;:::i;:::-;7253:2;7250:1;7246:10;7276:28;7300:2;7296;7292:11;7276:28;:::i;:::-;7338:15;;;7408;;;7404:24;;;7369:12;;;;7440:15;;;7437:35;;;7468:1;7465;7458:12;7437:35;7504:2;7496:6;7492:15;7481:26;;7516:142;7532:6;7527:3;7524:15;7516:142;;;7598:17;;7586:30;;7549:12;;;;7636;;;;7516:142;;;7676:5;6975:712;-1:-1:-1;;;;;;;6975:712:1:o;7692:669::-;7819:6;7827;7835;7888:2;7876:9;7867:7;7863:23;7859:32;7856:52;;;7904:1;7901;7894:12;7856:52;7927:29;7946:9;7927:29;:::i;:::-;7917:39;;8007:2;7996:9;7992:18;7979:32;8030:18;8071:2;8063:6;8060:14;8057:34;;;8087:1;8084;8077:12;8057:34;8110:61;8163:7;8154:6;8143:9;8139:22;8110:61;:::i;:::-;8100:71;;8224:2;8213:9;8209:18;8196:32;8180:48;;8253:2;8243:8;8240:16;8237:36;;;8269:1;8266;8259:12;8237:36;;8292:63;8347:7;8336:8;8325:9;8321:24;8292:63;:::i;:::-;8282:73;;;7692:669;;;;;:::o;8366:632::-;8537:2;8589:21;;;8659:13;;8562:18;;;8681:22;;;8508:4;;8537:2;8760:15;;;;8734:2;8719:18;;;8508:4;8803:169;8817:6;8814:1;8811:13;8803:169;;;8878:13;;8866:26;;8947:15;;;;8912:12;;;;8839:1;8832:9;8803:169;;9224:356;9426:2;9408:21;;;9445:18;;;9438:30;9504:34;9499:2;9484:18;;9477:62;9571:2;9556:18;;9224:356::o;9585:127::-;9646:10;9641:3;9637:20;9634:1;9627:31;9677:4;9674:1;9667:15;9701:4;9698:1;9691:15;9717:706;9797:6;9850:2;9838:9;9829:7;9825:23;9821:32;9818:52;;;9866:1;9863;9856:12;9818:52;9899:9;9893:16;9928:18;9969:2;9961:6;9958:14;9955:34;;;9985:1;9982;9975:12;9955:34;10023:6;10012:9;10008:22;9998:32;;10068:7;10061:4;10057:2;10053:13;10049:27;10039:55;;10090:1;10087;10080:12;10039:55;10119:2;10113:9;10141:2;10137;10134:10;10131:36;;;10147:18;;:::i;:::-;10189:53;10232:2;10213:13;;-1:-1:-1;;10209:27:1;10238:2;10205:36;10189:53;:::i;:::-;10176:66;;10265:2;10258:5;10251:17;10305:7;10300:2;10295;10291;10287:11;10283:20;10280:33;10277:53;;;10326:1;10323;10316:12;10277:53;10339:54;10390:2;10385;10378:5;10374:14;10369:2;10365;10361:11;10339:54;:::i;:::-;-1:-1:-1;10412:5:1;9717:706;-1:-1:-1;;;;9717:706:1:o;10428:127::-;10489:10;10484:3;10480:20;10477:1;10470:31;10520:4;10517:1;10510:15;10544:4;10541:1;10534:15;10560:135;10599:3;-1:-1:-1;;10620:17:1;;10617:43;;;10640:18;;:::i;:::-;-1:-1:-1;10687:1:1;10676:13;;10560:135::o;10700:184::-;10770:6;10823:2;10811:9;10802:7;10798:23;10794:32;10791:52;;;10839:1;10836;10829:12;10791:52;-1:-1:-1;10862:16:1;;10700:184;-1:-1:-1;10700:184:1:o;10889:128::-;10929:3;10960:1;10956:6;10953:1;10950:13;10947:39;;;10966:18;;:::i;:::-;-1:-1:-1;11002:9:1;;10889:128::o;13160:125::-;13200:4;13228:1;13225;13222:8;13219:34;;;13233:18;;:::i;:::-;-1:-1:-1;13270:9:1;;13160:125::o;13290:136::-;13329:3;13357:5;13347:39;;13366:18;;:::i;:::-;-1:-1:-1;;;13402:18:1;;13290:136::o;13431:127::-;13492:10;13487:3;13483:20;13480:1;13473:31;13523:4;13520:1;13513:15;13547:4;13544:1;13537:15
Swarm Source
ipfs://85713224078078289206842fd74452da82d05d8908d202f1abcc9eca7dad6551
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.