Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 48 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 18112979 | 397 days ago | IN | 0 ETH | 0.00151067 | ||||
Deposit | 18109091 | 398 days ago | IN | 0 ETH | 0.00062447 | ||||
Deposit | 18091463 | 400 days ago | IN | 0 ETH | 0.00080763 | ||||
Deposit | 18083900 | 401 days ago | IN | 0 ETH | 0.00098808 | ||||
Buy Ticket | 18082694 | 401 days ago | IN | 0 ETH | 0.00214919 | ||||
Deposit | 18076759 | 402 days ago | IN | 0 ETH | 0.00096796 | ||||
Buy Ticket | 18065113 | 404 days ago | IN | 0 ETH | 0.00470448 | ||||
Withdraw | 18062419 | 404 days ago | IN | 0 ETH | 0.00136419 | ||||
Deposit | 18057732 | 405 days ago | IN | 0 ETH | 0.00099891 | ||||
Buy Ticket | 18056468 | 405 days ago | IN | 0 ETH | 0.00331166 | ||||
Buy Ticket | 18056463 | 405 days ago | IN | 0 ETH | 0.00397323 | ||||
Deposit | 18045212 | 407 days ago | IN | 0 ETH | 0.00077026 | ||||
Buy Ticket | 18045190 | 407 days ago | IN | 0 ETH | 0.00227921 | ||||
Withdraw | 18043452 | 407 days ago | IN | 0 ETH | 0.00276611 | ||||
Buy Ticket | 18043044 | 407 days ago | IN | 0 ETH | 0.00701685 | ||||
Deposit | 18040762 | 407 days ago | IN | 0 ETH | 0.00118432 | ||||
Buy Ticket | 18040738 | 407 days ago | IN | 0 ETH | 0.00281616 | ||||
Deposit | 18037391 | 408 days ago | IN | 0 ETH | 0.00169281 | ||||
Buy Ticket | 18037035 | 408 days ago | IN | 0 ETH | 0.00672635 | ||||
Deposit | 18037032 | 408 days ago | IN | 0 ETH | 0.00217054 | ||||
Deposit | 18037009 | 408 days ago | IN | 0 ETH | 0.00188329 | ||||
Deposit | 18037006 | 408 days ago | IN | 0 ETH | 0.00196416 | ||||
Deposit | 18036750 | 408 days ago | IN | 0 ETH | 0.00214867 | ||||
Deposit | 18032879 | 408 days ago | IN | 0 ETH | 0.00123763 | ||||
Withdraw | 18032045 | 408 days ago | IN | 0 ETH | 0.00186143 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Ticket
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.21; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; contract Ticket is Ownable { using SafeMath for uint256; address private constant ZERO = 0x0000000000000000000000000000000000000000; IERC20 public token; IERC20 public usdt; enum TokenType {TOKEN, USDT} address public issuer; address public pool; mapping(bytes32 => bool) public signatures; event Deposit(address addr, uint256 amount, TokenType tokenType); event Withdraw(bytes32 hash, address addr, uint256 from, uint256 to, uint256 amount, TokenType tokenType); enum TicketType {Novice, Rising, Iconic, Master, GrandMaster} struct T { uint256 id; TicketType ticketType; } mapping(address => mapping(uint8 => bool)) public ticketMap; mapping(address => uint256[]) public userTickets; mapping(uint256 => T) public tickets; mapping(uint8 => uint256) public ticketPrices; event BuyTicket(address buyer, uint256 ticketId, TicketType ticketType); mapping(address => uint256) private _balances; mapping(uint256 => address) private _owners; uint256 private _totalSupply; receive() external payable { } constructor (address _token, address _usdt) Ownable() { token = IERC20(_token); usdt = IERC20(_usdt); ticketPrices[uint8(TicketType.Novice)] = 150000*10**18; ticketPrices[uint8(TicketType.Rising)] = 240000*10**18; ticketPrices[uint8(TicketType.Iconic)] = 330000*10**18; ticketPrices[uint8(TicketType.Master)] = 440000*10**18; ticketPrices[uint8(TicketType.GrandMaster)] = 550000*10**18; pool = msg.sender; issuer = msg.sender; } function setTicketPrices(uint256 novice, uint256 rising, uint256 iconic, uint256 master, uint256 gm) external onlyOwner { ticketPrices[uint8(TicketType.Novice)] = novice; ticketPrices[uint8(TicketType.Rising)] = rising; ticketPrices[uint8(TicketType.Iconic)] = iconic; ticketPrices[uint8(TicketType.Master)] = master; ticketPrices[uint8(TicketType.GrandMaster)] = gm; } function setPool(address _pool) external onlyOwner { pool = _pool; } function setIssuer(address _issuer) external onlyOwner { issuer = _issuer; } function poolStatus() view external returns (uint256, uint256) { uint256 tokenBalance = token.balanceOf(pool); uint256 usdtBalance = usdt.balanceOf(pool); return (tokenBalance, usdtBalance); } function deposit(uint256 amount, TokenType tokenType) external { if (tokenType == TokenType.TOKEN) { bool success = token.transferFrom(msg.sender, pool, amount); require(success, "token transfer failed"); emit Deposit(msg.sender, amount, TokenType.TOKEN); } else if (tokenType == TokenType.USDT) { bool success = usdt.transferFrom(msg.sender, pool, amount); require(success, "token transfer failed"); emit Deposit(msg.sender, amount, TokenType.USDT); } } function execSig(bytes memory signature, address addr, uint256 from, uint256 to, uint256 amount, TokenType tokenType) internal returns (bytes32) { // abi encode of [address, uint256, uint256, uint256, uint8] = 20+256/8*3+8/8 = 117 bytes bytes32 hash = keccak256(abi.encodePacked( "\x19Ethereum Signed Message:\n117", addr, from, to, amount, uint8(tokenType) )); require(!signatures[hash], "signature was executed"); require(SignatureChecker.isValidSignatureNow(issuer, hash, signature), "invalid signature"); signatures[hash] = true; return hash; } function withdraw(bytes memory signature, uint256 from, uint256 to, uint256 amount, TokenType tokenType) external { bytes32 hash = execSig(signature, msg.sender, from, to, amount, tokenType); if (tokenType == TokenType.TOKEN) { bool success = token.transferFrom(pool, msg.sender, amount); require(success, "token transfer failed"); emit Withdraw(hash, msg.sender, from, to, amount, TokenType.TOKEN); } else if (tokenType == TokenType.USDT) { bool success = usdt.transferFrom(pool, msg.sender, amount); require(success, "token transfer failed"); emit Withdraw(hash, msg.sender, from, to, amount, TokenType.USDT); } } function _mint(address to, uint256 tokenId) internal { _balances[to] += 1; _owners[tokenId] = to; _totalSupply += 1; } function totalSupply() public view returns (uint256) { return _totalSupply; } // buy function buyTicket(TicketType ticketType) external { require(ticketMap[msg.sender][uint8(ticketType)] == false, "can not buy already owned ticket"); uint256 price = ticketPrices[uint8(ticketType)]; require(price > 0, "can not buy"); uint256 ticketId = totalSupply(); _mint(msg.sender, ticketId); tickets[ticketId] = T( ticketId, ticketType ); userTickets[msg.sender].push(ticketId); bool success = token.transferFrom(msg.sender, pool, price); require(success, "token transfer failed"); ticketMap[msg.sender][uint8(ticketType)] = true; emit BuyTicket(msg.sender, ticketId, ticketType); } function balanceOf(address owner) public view returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } function getTickets(address ownerAddress) view external returns (T[] memory ownerTickets) { uint256 length = balanceOf(ownerAddress); ownerTickets = new T[](length); for(uint256 i = 0; i < length; i++) { uint256 ticketId = userTickets[ownerAddress][i]; ownerTickets[i] = tickets[ticketId]; } } function statusTickets(address ownerAddress) view external returns (bool, bool, bool, bool, bool) { return ( ticketMap[ownerAddress][uint8(TicketType.Novice)], ticketMap[ownerAddress][uint8(TicketType.Rising)], ticketMap[ownerAddress][uint8(TicketType.Iconic)], ticketMap[ownerAddress][uint8(TicketType.Master)], ticketMap[ownerAddress][uint8(TicketType.GrandMaster)] ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @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 // Deprecated in v4.8 } 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"); } } /** * @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) { 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. /// @solidity memory-safe-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 { 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 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 message) { // 32 is the length in bytes of hash, // enforced by the type signature above /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") mstore(0x1c, hash) message := keccak256(0x00, 0x3c) } } /** * @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 data) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) data := keccak256(ptr, 0x42) } } /** * @dev Returns an Ethereum Signed Data with intended validator, created from a * `validator` and `data` according to the version 0 of EIP-191. * * See {recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x00", validator, data)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; import "../../interfaces/IERC1271.sol"; /** * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like * Argent and Gnosis Safe. * * _Available since v4.1._ */ library SignatureChecker { /** * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) { (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); return (error == ECDSA.RecoverError.NoError && recovered == signer) || isValidERC1271SignatureNow(signer, hash, signature); } /** * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated * against the signer smart contract using ERC1271. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidERC1271SignatureNow( address signer, bytes32 hash, bytes memory signature ) internal view returns (bool) { (bool success, bytes memory result) = signer.staticcall( abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) ); return (success && result.length >= 32 && abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @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] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_usdt","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"ticketId","type":"uint256"},{"indexed":false,"internalType":"enum Ticket.TicketType","name":"ticketType","type":"uint8"}],"name":"BuyTicket","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"enum Ticket.TokenType","name":"tokenType","type":"uint8"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"hash","type":"bytes32"},{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"from","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"to","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"enum Ticket.TokenType","name":"tokenType","type":"uint8"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum Ticket.TicketType","name":"ticketType","type":"uint8"}],"name":"buyTicket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum Ticket.TokenType","name":"tokenType","type":"uint8"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ownerAddress","type":"address"}],"name":"getTickets","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"enum Ticket.TicketType","name":"ticketType","type":"uint8"}],"internalType":"struct Ticket.T[]","name":"ownerTickets","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"issuer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolStatus","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_issuer","type":"address"}],"name":"setIssuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pool","type":"address"}],"name":"setPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"novice","type":"uint256"},{"internalType":"uint256","name":"rising","type":"uint256"},{"internalType":"uint256","name":"iconic","type":"uint256"},{"internalType":"uint256","name":"master","type":"uint256"},{"internalType":"uint256","name":"gm","type":"uint256"}],"name":"setTicketPrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"signatures","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ownerAddress","type":"address"}],"name":"statusTickets","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"ticketMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"ticketPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tickets","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"enum Ticket.TicketType","name":"ticketType","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdt","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userTickets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum Ticket.TokenType","name":"tokenType","type":"uint8"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801562000010575f80fd5b5060405162001c2f38038062001c2f8339810160408190526200003391620001e0565b6200003e3362000175565b600180546001600160a01b03199081166001600160a01b039485161790915560028054821692909316919091179091556009602052691fc3842bd1f071c000007fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b556932d26d12e980b60000007f92e85d02570a8092d09a6e3a57665bc3815a2699a4074001bf1ccabf660f5a36556945e155fa0110fa4000007f6cde3cea4b3a3fb2488b2808bae7556f4a405e50f65e1794383bc026131b13c355695d2c72a2ac16a30000007fc575c31fea594a6eb97c8e9d3f9caee4c16218c6ef37e923234c0fe9014a61e75560045f8190526974778f4b571c4bc000007f8dc18c4ccfd75f5c815b63770fa542fd953e8fef7e0e44bbdd4913470ce7e9cb5580548216339081179091556003805490921617905562000216565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620001db575f80fd5b919050565b5f8060408385031215620001f2575f80fd5b620001fd83620001c4565b91506200020d60208401620001c4565b90509250929050565b611a0b80620002245f395ff3fe60806040526004361061013f575f3560e01c8063670fa69b116100b3578063cf260baf1161006d578063cf260baf1461044e578063f02286921461046d578063f2b2edc214610496578063f2fde38b146104b5578063f3eb1513146104d4578063fc0c546a1461050d575f80fd5b8063670fa69b146103115780636e4107961461033057806370a082311461035b578063715018a61461037a57806377b701771461038e5780638da5cb5b14610432575f80fd5b80632422224e116101045780632422224e146102145780632f48ab7d146102525780634437152a1461027157806350b447121461029057806355cc4e57146102d3578063654cfdff146102f2575f80fd5b8063023697f01461014a5780630ad182bc1461016b57806316f0115b146101a057806318160ddd146101d75780631d143848146101f5575f80fd5b3661014657005b5f80fd5b348015610155575f80fd5b5061016961016436600461150b565b61052c565b005b348015610176575f80fd5b5061018a610185366004611544565b6107de565b6040516101979190611585565b60405180910390f35b3480156101ab575f80fd5b506004546101bf906001600160a01b031681565b6040516001600160a01b039091168152602001610197565b3480156101e2575f80fd5b50600c545b604051908152602001610197565b348015610200575f80fd5b506003546101bf906001600160a01b031681565b34801561021f575f80fd5b5061024261022e3660046115dc565b60056020525f908152604090205460ff1681565b6040519015158152602001610197565b34801561025d575f80fd5b506002546101bf906001600160a01b031681565b34801561027c575f80fd5b5061016961028b366004611544565b610912565b34801561029b575f80fd5b506102c56102aa3660046115dc565b60086020525f90815260409020805460019091015460ff1682565b6040516101979291906115f3565b3480156102de575f80fd5b506101696102ed366004611544565b61093c565b3480156102fd575f80fd5b5061016961030c366004611615565b610966565b34801561031c575f80fd5b5061016961032b36600461163f565b610b41565b34801561033b575f80fd5b506101e761034a366004611686565b60096020525f908152604090205481565b348015610366575f80fd5b506101e7610375366004611544565b610c04565b348015610385575f80fd5b50610169610c88565b348015610399575f80fd5b506104006103a8366004611544565b6001600160a01b03165f9081526006602090815260408083208380529091528082205460018352818320546002845282842054600385528385205460048652939094205460ff92831695918316948316938316921690565b60408051951515865293151560208601529115159284019290925290151560608301521515608082015260a001610197565b34801561043d575f80fd5b505f546001600160a01b03166101bf565b348015610459575f80fd5b506101e761046836600461169f565b610c9b565b348015610478575f80fd5b50610481610cc6565b60408051928352602083019190915201610197565b3480156104a1575f80fd5b506101696104b03660046116db565b610dc0565b3480156104c0575f80fd5b506101696104cf366004611544565b610fc5565b3480156104df575f80fd5b506102426104ee3660046117b2565b600660209081525f928352604080842090915290825290205460ff1681565b348015610518575f80fd5b506001546101bf906001600160a01b031681565b335f9081526006602052604081209082600481111561054d5761054d61155d565b60ff908116825260208201929092526040015f205416156105b55760405162461bcd60e51b815260206004820181905260248201527f63616e206e6f742062757920616c7265616479206f776e6564207469636b657460448201526064015b60405180910390fd5b5f60095f8360048111156105cb576105cb61155d565b60ff1660ff1681526020019081526020015f205490505f811161061e5760405162461bcd60e51b815260206004820152600b60248201526a63616e206e6f742062757960a81b60448201526064016105ac565b5f610628600c5490565b9050610634338261103e565b60405180604001604052808281526020018460048111156106575761065761155d565b90525f828152600860209081526040909120825181559082015160018083018054909160ff19909116908360048111156106935761069361155d565b021790555050335f81815260076020908152604080832080546001808201835591855292842090920186905590546004805492516323b872dd60e01b81529395506001600160a01b03918216946323b872dd946106f8949193909116918991016117da565b6020604051808303815f875af1158015610714573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061073891906117fe565b9050806107575760405162461bcd60e51b81526004016105ac9061181d565b335f90815260066020526040812060019186600481111561077a5761077a61155d565b60ff168152602081019190915260409081015f20805460ff191692151592909217909155517f20a508fa34dea7ff5dd13b473e741c0c4337a77e6c3aef6029ba57457a14e52c906107d09033908590889061184c565b60405180910390a150505050565b60605f6107ea83610c04565b90508067ffffffffffffffff811115610805576108056116c7565b60405190808252806020026020018201604052801561084957816020015b604080518082019091525f80825260208201528152602001906001900390816108235790505b5091505f5b8181101561090b576001600160a01b0384165f90815260076020526040812080548390811061087f5761087f611878565b5f9182526020808320909101548083526008825260409283902083518085019094528054845260018101549194509183019060ff1660048111156108c5576108c561155d565b60048111156108d6576108d661155d565b815250508483815181106108ec576108ec611878565b6020026020010181905250508080610903906118a0565b91505061084e565b5050919050565b61091a6110ad565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6109446110ad565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b5f8160018111156109795761097961155d565b03610a5757600154600480546040516323b872dd60e01b81525f936001600160a01b03908116936323b872dd936109b8933393909116918991016117da565b6020604051808303815f875af11580156109d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109f891906117fe565b905080610a175760405162461bcd60e51b81526004016105ac9061181d565b7ff763e680fce25a97ffd55d8b705370c98b47b2285f7b3b2900c43606fd41804533845f604051610a4a939291906118c8565b60405180910390a1505050565b6001816001811115610a6b57610a6b61155d565b03610b3d57600254600480546040516323b872dd60e01b81525f936001600160a01b03908116936323b872dd93610aaa933393909116918991016117da565b6020604051808303815f875af1158015610ac6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610aea91906117fe565b905080610b095760405162461bcd60e51b81526004016105ac9061181d565b7ff763e680fce25a97ffd55d8b705370c98b47b2285f7b3b2900c43606fd41804533846001604051610a4a939291906118c8565b5050565b610b496110ad565b60096020527fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b949094557f92e85d02570a8092d09a6e3a57665bc3815a2699a4074001bf1ccabf660f5a36929092557f6cde3cea4b3a3fb2488b2808bae7556f4a405e50f65e1794383bc026131b13c3557fc575c31fea594a6eb97c8e9d3f9caee4c16218c6ef37e923234c0fe9014a61e75560045f527f8dc18c4ccfd75f5c815b63770fa542fd953e8fef7e0e44bbdd4913470ce7e9cb55565b5f6001600160a01b038216610c6d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105ac565b506001600160a01b03165f908152600a602052604090205490565b610c906110ad565b610c995f611106565b565b6007602052815f5260405f208181548110610cb4575f80fd5b905f5260205f20015f91509150505481565b600154600480546040516370a0823160e01b81526001600160a01b03918216928101929092525f9283928392909116906370a0823190602401602060405180830381865afa158015610d1a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d3e91906118ec565b600254600480546040516370a0823160e01b81526001600160a01b03918216928101929092529293505f92909116906370a0823190602401602060405180830381865afa158015610d91573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610db591906118ec565b919491935090915050565b5f610dcf863387878787611155565b90505f826001811115610de457610de461155d565b03610ec857600154600480546040516323b872dd60e01b81525f936001600160a01b03908116936323b872dd93610e229392169133918a91016117da565b6020604051808303815f875af1158015610e3e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e6291906117fe565b905080610e815760405162461bcd60e51b81526004016105ac9061181d565b7f6de3a2d24ac72cba8b5ac58ddcae2621adf76b25c5fffa56c68162f2547f969882338888885f604051610eba96959493929190611903565b60405180910390a150610fbd565b6001826001811115610edc57610edc61155d565b03610fbd57600254600480546040516323b872dd60e01b81525f936001600160a01b03908116936323b872dd93610f1a9392169133918a91016117da565b6020604051808303815f875af1158015610f36573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f5a91906117fe565b905080610f795760405162461bcd60e51b81526004016105ac9061181d565b7f6de3a2d24ac72cba8b5ac58ddcae2621adf76b25c5fffa56c68162f2547f969882338888886001604051610fb396959493929190611903565b60405180910390a1505b505050505050565b610fcd6110ad565b6001600160a01b0381166110325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ac565b61103b81611106565b50565b6001600160a01b0382165f908152600a60205260408120805460019290611066908490611946565b90915550505f818152600b6020526040812080546001600160a01b0319166001600160a01b038516179055600c8054600192906110a4908490611946565b90915550505050565b5f546001600160a01b03163314610c995760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105ac565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f808686868686600181111561116d5761116d61155d565b6040517f19457468657265756d205369676e6564204d6573736167653a0a313137000000602082015260609590951b6bffffffffffffffffffffffff1916603d86015260518501939093526071840191909152609183015260f81b6001600160f81b03191660b182015260b20160408051601f1981840301815291815281516020928301205f818152600590935291205490915060ff161561124a5760405162461bcd60e51b81526020600482015260166024820152751cda59db985d1d5c99481dd85cc8195e1958dd5d195960521b60448201526064016105ac565b600354611261906001600160a01b0316828a6112c5565b6112a15760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b60448201526064016105ac565b5f818152600560205260409020805460ff1916600117905590509695505050505050565b5f805f6112d28585611325565b90925090505f8160048111156112ea576112ea61155d565b1480156113085750856001600160a01b0316826001600160a01b0316145b806113195750611319868686611367565b925050505b9392505050565b5f808251604103611359576020830151604084015160608501515f1a61134d8782858561144e565b94509450505050611360565b505f905060025b9250929050565b5f805f856001600160a01b0316631626ba7e60e01b868660405160240161138f929190611981565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516113cd91906119ba565b5f60405180830381855afa9150503d805f8114611405576040519150601f19603f3d011682016040523d82523d5f602084013e61140a565b606091505b509150915081801561141e57506020815110155b801561131957508051630b135d3f60e11b9061144390830160209081019084016118ec565b149695505050505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561148357505f90506003611502565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156114d4573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b0381166114fc575f60019250925050611502565b91505f90505b94509492505050565b5f6020828403121561151b575f80fd5b81356005811061131e575f80fd5b80356001600160a01b038116811461153f575f80fd5b919050565b5f60208284031215611554575f80fd5b61131e82611529565b634e487b7160e01b5f52602160045260245ffd5b600581106115815761158161155d565b9052565b602080825282518282018190525f919060409081850190868401855b828110156115cf578151805185528601516115be87860182611571565b5092840192908501906001016115a1565b5091979650505050505050565b5f602082840312156115ec575f80fd5b5035919050565b8281526040810161131e6020830184611571565b80356002811061153f575f80fd5b5f8060408385031215611626575f80fd5b8235915061163660208401611607565b90509250929050565b5f805f805f60a08688031215611653575f80fd5b505083359560208501359550604085013594606081013594506080013592509050565b803560ff8116811461153f575f80fd5b5f60208284031215611696575f80fd5b61131e82611676565b5f80604083850312156116b0575f80fd5b6116b983611529565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b5f805f805f60a086880312156116ef575f80fd5b853567ffffffffffffffff80821115611706575f80fd5b818801915088601f830112611719575f80fd5b81358181111561172b5761172b6116c7565b604051601f8201601f19908116603f01168101908382118183101715611753576117536116c7565b816040528281528b602084870101111561176b575f80fd5b826020860160208301375f6020848301015280995050505050506020860135935060408601359250606086013591506117a660808701611607565b90509295509295909350565b5f80604083850312156117c3575f80fd5b6117cc83611529565b915061163660208401611676565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f6020828403121561180e575f80fd5b8151801515811461131e575f80fd5b6020808252601590820152741d1bdad95b881d1c985b9cd9995c8819985a5b1959605a1b604082015260600190565b6001600160a01b038416815260208101839052606081016118706040830184611571565b949350505050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f600182016118b1576118b161188c565b5060010190565b600281106115815761158161155d565b6001600160a01b0384168152602081018390526060810161187060408301846118b8565b5f602082840312156118fc575f80fd5b5051919050565b8681526001600160a01b038616602082015260408101859052606081018490526080810183905260c0810161193b60a08301846118b8565b979650505050505050565b808201808211156119595761195961188c565b92915050565b5f5b83811015611979578181015183820152602001611961565b50505f910152565b828152604060208201525f82518060408401526119a581606085016020870161195f565b601f01601f1916919091016060019392505050565b5f82516119cb81846020870161195f565b919091019291505056fea264697066735822122067d8cb058c526a920c32470d42ae9de24c2affb41fdf65bf16964623a69966a564736f6c63430008150033000000000000000000000000467511ec2b3a414c2feab86982d3c4afc22c966d000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Deployed Bytecode
0x60806040526004361061013f575f3560e01c8063670fa69b116100b3578063cf260baf1161006d578063cf260baf1461044e578063f02286921461046d578063f2b2edc214610496578063f2fde38b146104b5578063f3eb1513146104d4578063fc0c546a1461050d575f80fd5b8063670fa69b146103115780636e4107961461033057806370a082311461035b578063715018a61461037a57806377b701771461038e5780638da5cb5b14610432575f80fd5b80632422224e116101045780632422224e146102145780632f48ab7d146102525780634437152a1461027157806350b447121461029057806355cc4e57146102d3578063654cfdff146102f2575f80fd5b8063023697f01461014a5780630ad182bc1461016b57806316f0115b146101a057806318160ddd146101d75780631d143848146101f5575f80fd5b3661014657005b5f80fd5b348015610155575f80fd5b5061016961016436600461150b565b61052c565b005b348015610176575f80fd5b5061018a610185366004611544565b6107de565b6040516101979190611585565b60405180910390f35b3480156101ab575f80fd5b506004546101bf906001600160a01b031681565b6040516001600160a01b039091168152602001610197565b3480156101e2575f80fd5b50600c545b604051908152602001610197565b348015610200575f80fd5b506003546101bf906001600160a01b031681565b34801561021f575f80fd5b5061024261022e3660046115dc565b60056020525f908152604090205460ff1681565b6040519015158152602001610197565b34801561025d575f80fd5b506002546101bf906001600160a01b031681565b34801561027c575f80fd5b5061016961028b366004611544565b610912565b34801561029b575f80fd5b506102c56102aa3660046115dc565b60086020525f90815260409020805460019091015460ff1682565b6040516101979291906115f3565b3480156102de575f80fd5b506101696102ed366004611544565b61093c565b3480156102fd575f80fd5b5061016961030c366004611615565b610966565b34801561031c575f80fd5b5061016961032b36600461163f565b610b41565b34801561033b575f80fd5b506101e761034a366004611686565b60096020525f908152604090205481565b348015610366575f80fd5b506101e7610375366004611544565b610c04565b348015610385575f80fd5b50610169610c88565b348015610399575f80fd5b506104006103a8366004611544565b6001600160a01b03165f9081526006602090815260408083208380529091528082205460018352818320546002845282842054600385528385205460048652939094205460ff92831695918316948316938316921690565b60408051951515865293151560208601529115159284019290925290151560608301521515608082015260a001610197565b34801561043d575f80fd5b505f546001600160a01b03166101bf565b348015610459575f80fd5b506101e761046836600461169f565b610c9b565b348015610478575f80fd5b50610481610cc6565b60408051928352602083019190915201610197565b3480156104a1575f80fd5b506101696104b03660046116db565b610dc0565b3480156104c0575f80fd5b506101696104cf366004611544565b610fc5565b3480156104df575f80fd5b506102426104ee3660046117b2565b600660209081525f928352604080842090915290825290205460ff1681565b348015610518575f80fd5b506001546101bf906001600160a01b031681565b335f9081526006602052604081209082600481111561054d5761054d61155d565b60ff908116825260208201929092526040015f205416156105b55760405162461bcd60e51b815260206004820181905260248201527f63616e206e6f742062757920616c7265616479206f776e6564207469636b657460448201526064015b60405180910390fd5b5f60095f8360048111156105cb576105cb61155d565b60ff1660ff1681526020019081526020015f205490505f811161061e5760405162461bcd60e51b815260206004820152600b60248201526a63616e206e6f742062757960a81b60448201526064016105ac565b5f610628600c5490565b9050610634338261103e565b60405180604001604052808281526020018460048111156106575761065761155d565b90525f828152600860209081526040909120825181559082015160018083018054909160ff19909116908360048111156106935761069361155d565b021790555050335f81815260076020908152604080832080546001808201835591855292842090920186905590546004805492516323b872dd60e01b81529395506001600160a01b03918216946323b872dd946106f8949193909116918991016117da565b6020604051808303815f875af1158015610714573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061073891906117fe565b9050806107575760405162461bcd60e51b81526004016105ac9061181d565b335f90815260066020526040812060019186600481111561077a5761077a61155d565b60ff168152602081019190915260409081015f20805460ff191692151592909217909155517f20a508fa34dea7ff5dd13b473e741c0c4337a77e6c3aef6029ba57457a14e52c906107d09033908590889061184c565b60405180910390a150505050565b60605f6107ea83610c04565b90508067ffffffffffffffff811115610805576108056116c7565b60405190808252806020026020018201604052801561084957816020015b604080518082019091525f80825260208201528152602001906001900390816108235790505b5091505f5b8181101561090b576001600160a01b0384165f90815260076020526040812080548390811061087f5761087f611878565b5f9182526020808320909101548083526008825260409283902083518085019094528054845260018101549194509183019060ff1660048111156108c5576108c561155d565b60048111156108d6576108d661155d565b815250508483815181106108ec576108ec611878565b6020026020010181905250508080610903906118a0565b91505061084e565b5050919050565b61091a6110ad565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6109446110ad565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b5f8160018111156109795761097961155d565b03610a5757600154600480546040516323b872dd60e01b81525f936001600160a01b03908116936323b872dd936109b8933393909116918991016117da565b6020604051808303815f875af11580156109d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109f891906117fe565b905080610a175760405162461bcd60e51b81526004016105ac9061181d565b7ff763e680fce25a97ffd55d8b705370c98b47b2285f7b3b2900c43606fd41804533845f604051610a4a939291906118c8565b60405180910390a1505050565b6001816001811115610a6b57610a6b61155d565b03610b3d57600254600480546040516323b872dd60e01b81525f936001600160a01b03908116936323b872dd93610aaa933393909116918991016117da565b6020604051808303815f875af1158015610ac6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610aea91906117fe565b905080610b095760405162461bcd60e51b81526004016105ac9061181d565b7ff763e680fce25a97ffd55d8b705370c98b47b2285f7b3b2900c43606fd41804533846001604051610a4a939291906118c8565b5050565b610b496110ad565b60096020527fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b949094557f92e85d02570a8092d09a6e3a57665bc3815a2699a4074001bf1ccabf660f5a36929092557f6cde3cea4b3a3fb2488b2808bae7556f4a405e50f65e1794383bc026131b13c3557fc575c31fea594a6eb97c8e9d3f9caee4c16218c6ef37e923234c0fe9014a61e75560045f527f8dc18c4ccfd75f5c815b63770fa542fd953e8fef7e0e44bbdd4913470ce7e9cb55565b5f6001600160a01b038216610c6d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105ac565b506001600160a01b03165f908152600a602052604090205490565b610c906110ad565b610c995f611106565b565b6007602052815f5260405f208181548110610cb4575f80fd5b905f5260205f20015f91509150505481565b600154600480546040516370a0823160e01b81526001600160a01b03918216928101929092525f9283928392909116906370a0823190602401602060405180830381865afa158015610d1a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d3e91906118ec565b600254600480546040516370a0823160e01b81526001600160a01b03918216928101929092529293505f92909116906370a0823190602401602060405180830381865afa158015610d91573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610db591906118ec565b919491935090915050565b5f610dcf863387878787611155565b90505f826001811115610de457610de461155d565b03610ec857600154600480546040516323b872dd60e01b81525f936001600160a01b03908116936323b872dd93610e229392169133918a91016117da565b6020604051808303815f875af1158015610e3e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e6291906117fe565b905080610e815760405162461bcd60e51b81526004016105ac9061181d565b7f6de3a2d24ac72cba8b5ac58ddcae2621adf76b25c5fffa56c68162f2547f969882338888885f604051610eba96959493929190611903565b60405180910390a150610fbd565b6001826001811115610edc57610edc61155d565b03610fbd57600254600480546040516323b872dd60e01b81525f936001600160a01b03908116936323b872dd93610f1a9392169133918a91016117da565b6020604051808303815f875af1158015610f36573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f5a91906117fe565b905080610f795760405162461bcd60e51b81526004016105ac9061181d565b7f6de3a2d24ac72cba8b5ac58ddcae2621adf76b25c5fffa56c68162f2547f969882338888886001604051610fb396959493929190611903565b60405180910390a1505b505050505050565b610fcd6110ad565b6001600160a01b0381166110325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ac565b61103b81611106565b50565b6001600160a01b0382165f908152600a60205260408120805460019290611066908490611946565b90915550505f818152600b6020526040812080546001600160a01b0319166001600160a01b038516179055600c8054600192906110a4908490611946565b90915550505050565b5f546001600160a01b03163314610c995760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105ac565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f808686868686600181111561116d5761116d61155d565b6040517f19457468657265756d205369676e6564204d6573736167653a0a313137000000602082015260609590951b6bffffffffffffffffffffffff1916603d86015260518501939093526071840191909152609183015260f81b6001600160f81b03191660b182015260b20160408051601f1981840301815291815281516020928301205f818152600590935291205490915060ff161561124a5760405162461bcd60e51b81526020600482015260166024820152751cda59db985d1d5c99481dd85cc8195e1958dd5d195960521b60448201526064016105ac565b600354611261906001600160a01b0316828a6112c5565b6112a15760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964207369676e617475726560781b60448201526064016105ac565b5f818152600560205260409020805460ff1916600117905590509695505050505050565b5f805f6112d28585611325565b90925090505f8160048111156112ea576112ea61155d565b1480156113085750856001600160a01b0316826001600160a01b0316145b806113195750611319868686611367565b925050505b9392505050565b5f808251604103611359576020830151604084015160608501515f1a61134d8782858561144e565b94509450505050611360565b505f905060025b9250929050565b5f805f856001600160a01b0316631626ba7e60e01b868660405160240161138f929190611981565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516113cd91906119ba565b5f60405180830381855afa9150503d805f8114611405576040519150601f19603f3d011682016040523d82523d5f602084013e61140a565b606091505b509150915081801561141e57506020815110155b801561131957508051630b135d3f60e11b9061144390830160209081019084016118ec565b149695505050505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561148357505f90506003611502565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156114d4573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b0381166114fc575f60019250925050611502565b91505f90505b94509492505050565b5f6020828403121561151b575f80fd5b81356005811061131e575f80fd5b80356001600160a01b038116811461153f575f80fd5b919050565b5f60208284031215611554575f80fd5b61131e82611529565b634e487b7160e01b5f52602160045260245ffd5b600581106115815761158161155d565b9052565b602080825282518282018190525f919060409081850190868401855b828110156115cf578151805185528601516115be87860182611571565b5092840192908501906001016115a1565b5091979650505050505050565b5f602082840312156115ec575f80fd5b5035919050565b8281526040810161131e6020830184611571565b80356002811061153f575f80fd5b5f8060408385031215611626575f80fd5b8235915061163660208401611607565b90509250929050565b5f805f805f60a08688031215611653575f80fd5b505083359560208501359550604085013594606081013594506080013592509050565b803560ff8116811461153f575f80fd5b5f60208284031215611696575f80fd5b61131e82611676565b5f80604083850312156116b0575f80fd5b6116b983611529565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b5f805f805f60a086880312156116ef575f80fd5b853567ffffffffffffffff80821115611706575f80fd5b818801915088601f830112611719575f80fd5b81358181111561172b5761172b6116c7565b604051601f8201601f19908116603f01168101908382118183101715611753576117536116c7565b816040528281528b602084870101111561176b575f80fd5b826020860160208301375f6020848301015280995050505050506020860135935060408601359250606086013591506117a660808701611607565b90509295509295909350565b5f80604083850312156117c3575f80fd5b6117cc83611529565b915061163660208401611676565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f6020828403121561180e575f80fd5b8151801515811461131e575f80fd5b6020808252601590820152741d1bdad95b881d1c985b9cd9995c8819985a5b1959605a1b604082015260600190565b6001600160a01b038416815260208101839052606081016118706040830184611571565b949350505050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f600182016118b1576118b161188c565b5060010190565b600281106115815761158161155d565b6001600160a01b0384168152602081018390526060810161187060408301846118b8565b5f602082840312156118fc575f80fd5b5051919050565b8681526001600160a01b038616602082015260408101859052606081018490526080810183905260c0810161193b60a08301846118b8565b979650505050505050565b808201808211156119595761195961188c565b92915050565b5f5b83811015611979578181015183820152602001611961565b50505f910152565b828152604060208201525f82518060408401526119a581606085016020870161195f565b601f01601f1916919091016060019392505050565b5f82516119cb81846020870161195f565b919091019291505056fea264697066735822122067d8cb058c526a920c32470d42ae9de24c2affb41fdf65bf16964623a69966a564736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000467511ec2b3a414c2feab86982d3c4afc22c966d000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
-----Decoded View---------------
Arg [0] : _token (address): 0x467511EC2B3A414c2fEAb86982d3C4AFC22c966D
Arg [1] : _usdt (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000467511ec2b3a414c2feab86982d3c4afc22c966d
Arg [1] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 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.