Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
NFT
Overview
Max Total Supply
8,888 CHF
Holders
2,569
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 CHFLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ChubbiFren
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 8000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./ChubbiAuction.sol"; /** * @title ChubbiAuction * ChubbiFren - The main contract, */ contract ChubbiFren is ChubbiAuction { constructor( string memory _name, string memory _symbol, address _proxyRegistryAddress ) ChubbiAuction(_name, _symbol, _proxyRegistryAddress, 8888) { setBaseTokenURI("https://www.chubbiverse.com/api/meta/1/"); reservations[0x0eC5c1691219ffDfC50B6d4E3Bfb1B60b7eD8D5E] = 10; reservations[0x7788238091052072d5969Ac7452E46e94B23f7A3] = 5; reservations[0x593aB4f8412575d4B2EA36d373C04956A8Fbd3cD] = 5; reservations[0xFA6e1eFeD2FcE1337c6b2c0C0E7bFAa3927E6F23] = 5; reservations[0xCAe400e06B6D7d1632538C730223e9c06eE69f12] = 5; reservations[0x14929281cb3dC7F7E47C95a977C05ed4B85489d0] = 50; reservations[0x1Ce99932fD278E00911814dC4bd403e1293d8ED2] = 5; reservations[0x387Af9Df1a190CfAF420a0470A55f5cE22C5D356] = 5; reservations[0xc55ba66cab0298B3A67e1D0bf6A1613907941B09] = 10; reservations[0xea7cEB44004Ce65DEaD925e6Ae12fEdc30c88267] = 10; reservations[0x91609451B6a5775608787f3Da9501104935D3b25] = 15; reservations[0x60EA59C40efc5b297d3b019FA26c217761d0c266] = 5; reservations[0x926d2562Cd25E2a8988449F61271c19fF65d2C04] = 10; reservations[0x90E1F595Abc8D731cf82031c974aDD334B84b29E] = 20; reservations[0x7F7b32c998083D66De56602D75bC820b768C721B] = 5; reservations[0xd8Bca4f14B89d7BE3a5fd5AD97AAA6775D11FC46] = 5; reservations[0xA98220f6dC5DFcA27ff19605a0a6D3E1dDE4CFE8] = 5; reservations[0xEF30fA2138A725523451688279b11216B0505E98] = 15; reservations[0x5D89737E854c860d25E106C498c6DCA0B516eD7a] = 5; reservations[0xEC080DbeE8F60c8E6d7c3F52e10832718d2b8D5A] = 5; reservations[0x3cf0aCd510F51506D10f28ABb4822238C405Ac61] = 40; // 10 from snapsot, 30 from team reservations[0xe86dad56eE5C8F344cCaF348158C6258A965C8aA] = 5; reservations[0xF13a69F85075972AbB8435c8bBa1f24D91EFB986] = 10; reservations[0x277e1546A1Be3BC1737d0EAb43E6c1c86c0f4207] = 10; reservations[0x0bA516f6142C1cC8B6A6443bEf748e244FeaC99E] = 5; reservations[0x6Ec30Fd91A504Aad948839B985C7263888B2Ad68] = 15; reservations[0x64e714344780B12384597F5bF9aE35F9ADf98863] = 5; reservations[0x26A49F3730e2984E9188E220fC3fa4B6A605EA21] = 10; reservations[0x77C979931AD12d2B55e5E997a440f43660A21ffa] = 10; reservations[0x59b836B2f15C89E1007e011af47607e01C365F71] = 25; reservations[0xFe5573C66273313034F7fF6050c54b5402553716] = 5; reservations[0x2a92280f7572Ee27b50eb81D8Bd644a5aCcf16F6] = 5; reservations[0x3329ca36d37b0DE4228795eFaA490a7763202172] = 5; reservations[0xbBDFDE2786afD8858807bDf617C10F9ad521fAb1] = 5; reservations[0x5BA17875Ea5F3BAA8E9A06aaf973Ba7c21994C40] = 10; reservations[0xd918252c46bf5D399Ce827151B422810388c79ec] = 5; reservations[0xb09548d2ea367b0b0dF0FE1AC0C079F7D5354a50] = 5; reservations[0xde923Df474661dDF3727C913EbFEe3df0b37BEB8] = 5; reservations[0x6A3B82f775D9eFE19518b1F68Fe86FAf0eAf2a90] = 10; reservations[0x80207B6ef45dcD6E2d2f5Bf692320C8b46b6bf09] = 5; reservations[0x1a330bF19B7865935cd675fD827c6cbC742fFE5a] = 35; // 30 from snapshot, 5 from team reservations[0x044DeeAe38e81be36Fe1F0245F4cb14Be0A19Cb0] = 5; reservations[0x06644f3054d2579e8b7425436bB6ab13e91999EB] = 10; reservations[0x606a90DF26ED6b2680aF64fc63E2887a726703d4] = 10; reservations[0xe1b5F0862dc5A2A4e6069C3e31232a34d21Ef2Fb] = 5; reservations[0x6e51817Aa02674FE6bA1a790E23AA720c4843804] = 5; reservations[0xf305F90B19CF66fC2D038f92a26440B66cF858F6] = 5; reservations[0x5D55a50e4A1d7ce19B108aD4a44C60D02fAd9637] = 5; reservations[0xE7f2A881a30a1b9D16BebdbE42B226253B4Ca489] = 5; reservations[0x45A7A6adA84207c11a29305b18E4DBb16Bd1dd7E] = 5; reservations[0x75c8E2dd57927eB0373E8e201ebF582406aDcf45] = 15; reservations[0x923de254c1E93D710CCa6115b63712EDc76CE816] = 25; reservations[0x9cBd60A51b54aB626cDE7861Afe43D2CD82dA327] = 10; // 5 from snapshot, 5 from team reservations[0x1ff13480f8CD08e778755987a648b9D80d78c966] = 5; reservations[0xBe27D73FCf696ECf9Febff0C90F7Ac9e05B0E41A] = 25; reservations[0x94abB1573c83f9a53cAD661514Ed7F0419EC594A] = 5; reservations[0xb71B13b85D2c094B0FDeC64ab891b5BF5f110a8e] = 5; reservations[0x25CD302E37a69D70a6Ef645dAea5A7de38c66E2a] = 10; reservations[0x88cc77f53A077775bcD8067822Ed02Bd12AC4131] = 10; reservations[0x182Eba9213c3A45aEc4a400350EacD2E683f5981] = 5; reservations[0x3082a2dd0028231423a5fB470407a89c024B308d] = 5; reservations[0x642452Bd55591CD954B2987c70e7f2ccC71dE313] = 5; reservations[0xF404Aa7d1eAB3fABA127E57A1E4aFA4D6c31abF8] = 10; reservations[0x6f4d8C05aC656cbb2Edc9aDC14743C123A0EB65b] = 10; // 5 from snapshot, 5 from team reservations[0x108B9595D1fA09A9a228e011D7768c55D8d989AD] = 5; reservations[0x1d69d3CDEbB5c3E2B8b73cC4D49Aa145ecb7950F] = 5; reservations[0x3677C1621D49611811BBca58d9b2ac753bE5b3b6] = 5; reservations[0x868b2BC9416bBd2E110ad99e4F55C1D51212271a] = 5; reservations[0x7FdCA0A469Ea8b50b92322aFc0215b67D56A5e9A] = 5; reservations[0x52e0f7339C1BEd710DBD4D84E78F791eBe2df6b9] = 10; reservations[0x3df6c1D54ad103233B3c74a12042f67239d69f70] = 45; // 15 from snapshot, 30 from team reservations[0xA4c8d9e4Ec5f2831701A81389465498B83f9457d] = 5; reservations[0x8DD6629B2272b4fb384c13E982f8e08Bc8EE001E] = 5; reservations[0x758f9112899834dB1d5dC1860c06900c3d3bd75a] = 10; reservations[0xDCbf721551A937768537458C61005F1CBECb043c] = 5; reservations[0x5Cb58a3fA9B02ae11f443b3Adc231172356EcCd7] = 5; reservations[0x774237c2a8Fd84c0D4D2C97cB03D3B6C87cB0431] = 5; reservations[0x60d727CBfd8Df0af32eFa764ebEc917c59FcEd4F] = 15; reservations[0xa11e95CA2bE0793C5AD0C4FF20bd6dab0992C6a2] = 5; reservations[0x0bd43F463074e731718f970C35b3fa7c8184c642] = 5; reservations[0x68EAbf8B000AbfF6d55Cfa918D2fe0638d4F98af] = 5; reservations[0xc6E999FCCF8bc1CD8BEfcfA10Cf2cC1f3b2612e2] = 5; reservations[0x3c2B4bDCD2F742C55186fc599Cb733a127E2b8ab] = 5; reservations[0x3Ba77787266aE8225805e4b4750fd4E9f800da33] = 20; reservations[0xCfCDd074DC974af94fA2b9d56b6A213c0D96EaF9] = 5; reservations[0xB135c7E7604A8D4723548d9a5F67D98c110E78A8] = 5; reservations[0xBE1e5A07c3Af9b648b2DeC7F193bc0835646725E] = 5; reservations[0xc7bc4Aa98eCe00E4F8feC8Fe7B0591F80aBbc855] = 5; reservations[0x42d3b1e30f39191F6dA2701E31cfc82574ea14D5] = 5; reservations[0x7f55Bd494bed4b4eED2064ECCC1aF75e9d76aD4b] = 5; reservations[0x5765bdEFb7EAD33f4Eb7935C5d5eb130f4299568] = 5; reservations[0x0c5A9cd5c97F716e2E9F3699Bd2905BCA0059867] = 10; reservations[0x5338035c008EA8c4b850052bc8Dad6A33dc2206c] = 15; reservations[0x518aE9dC06AF3A4d2DD1B75E2367C0D23257B320] = 8; // 5 from snapshot, 3 from team reservations[0xd102C5AD3c42bdFBB1762DB4d0e3707ffB7e1486] = 10; reservations[0x8067ea0006949CFF984083A83A56a8B0DEC2eab2] = 5; reservations[0x0f1025f754b3eb32ab3105127b563084BFa03A6F] = 10; reservations[0xbD912A2B4Aeb0BC7D3827d11D621F79D66eaF633] = 5; reservations[0x2d45D1259B4f136F5050CB9dbb3c02253f74c647] = 5; reservations[0xa2BFF706Dd94C8E8284314aAf243D8D99cf723DA] = 5; reservations[0x1D551AcE62be491Fc49E9A6B3d737e51e2c59E8c] = 5; reservations[0x5bEcE23dDf9BDe3e1F735b1b09b5958173D45014] = 10; reservations[0x243AE63fed8680067e16F63546d312AAC1f5d716] = 5; reservations[0x7CcaCab19ee2B7EC643Ef2d436c235A5c1E76Fa9] = 5; reservations[0xDDCCC8CBF91f31FF7639b4E458cF518219eFC7bd] = 5; reservations[0xFac137e6753B1C7b210cd1167F221B61D6Eb4638] = 10; reservations[0x45e2Aa1483A1C02f1E7D07FF904bb1dEd9350aB7] = 5; reservations[0x3b10f088D7a83E92E91D4A84FE2c656AF92a801D] = 5; reservations[0xA6D3a33a1C66083859765b9D6E407D095a908193] = 10; reservations[0xaf9E021FC76c0aFBf4a520152C5Cf792561503B5] = 5; reservations[0xd1B18dD9fCfd0cfaED13D0a107B98B47d3f67eF6] = 5; reservations[0x6514304C439565BC6bF5e60dC69dC355a034E6C3] = 5; reservations[0xA0Acc2aE14c814d97c766aE2582150c415cef1e6] = 5; reservations[0xA309e257Db5C325e4B83510fCc950449447E6BdA] = 5; reservations[0xa48AE1c287fa6DE4581Ca3E00f0a481a1AE80778] = 5; reservations[0xBaEa3Cf94aBd0D6E0F029ef5B0E54E9424A72985] = 10; reservations[0x716eb921F3B346d2C5749B5380dC740d359055D7] = 10; reservations[0x4c6FaaAf155AA05A0AF39Dd51ee9E47042d19C64] = 10; reservations[0x50F620A98f0514F5cA9ff7B44125F632EE7aC84a] = 5; reservations[0x81a4A0655A157B731D06fE0b597F67B5bDDdedf3] = 5; reservations[0xfCAD3475520fb54Fc95305A6549A79170DA8B7C0] = 5; reservations[0xD5b1BF6c5BA8416D699e016BB99646cA5DbAb8d7] = 5; reservations[0x7c7582643E67b443b0c3f82D0513ba3D25c09F92] = 5; reservations[0xcDae1Bab521E6aD0756f41166E1Ac68D4b5Ba55a] = 20; reservations[0x7D551B4Aa5938d18be5C5e9FdE7fECE9566611ba] = 10; reservations[0x6a8b990801daDe9077acB0eA8948D023C72D7060] = 5; reservations[0x0F0eAE91990140C560D4156DB4f00c854Dc8F09E] = 10; reservations[0x409abF69Bcf740a1cEe04f3f330610fd985BE0c3] = 5; reservations[0xb20f6f5F6D624571C000d75bb8081b488f1D9c9a] = 5; reservations[0xb51fBfdAc76132eB819c91b0Bfc5A72913B88329] = 5; reservations[0x392FA612154CCaDd6b3B34048D4De84A4E2e0d8f] = 5; reservations[0xab0e3fE8670583591810689b0a490D8226f0D79B] = 10; reservations[0x078ad2Aa3B4527e4996D087906B2a3DA51BbA122] = 10; reservations[0x34f6e236880D962726Fdb5996f6a0Bce42ea6Ca5] = 5; reservations[0x9874346057faA8C5638694e1c1959f1d4bb48149] = 5; reservations[0x000433708645EaaD9f65687CDbe4033d92f6A6d2] = 5; reservations[0xE85b14f37ed20f775BEeBf90e657d8A050640623] = 5; reservations[0x8104cd18e37f2634257a97338C32EC7BFbfb72bD] = 5; reservations[0x97C6f53B75D8243a7CBC1c3bc491c993842db3b3] = 5; reservations[0x750A31fA07184CAf87b6Cce251d2F0D7928BADde] = 5; reservations[0xfa50E8AE8E380fAd984850F9f2BA7Eb424502d6d] = 5; reservations[0x9631b82269c02a7616d990C0bf9Ba1dC1Bed1a73] = 5; reservations[0xD8CbcFFe51B0364C50d6a0Ac947A61e3118d10D6] = 5; reservations[0x1048fA01899a43821c7aE77Fe96aF45F19A2646B] = 5; reservations[0x9Cb737840CF5538942d1dA5576B50A7005382F13] = 5; reservations[0x96fc154e9f97541e0b9e76fdd162a8Ecd2F2eD7B] = 5; reservations[0xE54c447e47DC308Ff12C478E725C150e1586FfB0] = 10; // 5 from snapshot, 5 from team reservations[0x5101F854F670812f2eBca8f6669AfF324F192218] = 5; reservations[0xc2363b54f8842a4Da3Cd19D6F3b6F9988c72800D] = 5; reservations[0x64c420ABc818E9FCa4a94FF1aD78c5B7E237e44B] = 5; reservations[0x2f6e116E6E4BfF7c00402d6B321192BCc4d797FA] = 5; reservations[0x95B0D143ac845877DFdb7cE07Fc1549D88783d68] = 5; reservations[0x19Eb7FfDcD670Ca917110Bd032463120a5E58C8E] = 5; reservations[0x83E84CC194E595B43dCEDfBFfC3e0358366307f1] = 5; reservations[0x3916bcCF534a200467D546414Bf93A2BF47DD7CD] = 5; reservations[0xa920268fF7Ac82a63fF5070d32401900Ee5626C6] = 5; reservations[0xE62c522b0EeA657414faD0a1893223f54CCD5190] = 5; reservations[0xAE68B4Ec732c534F5d3D0B990af2E3FB7E25FbE3] = 5; reservations[0x8945911b7bd08a9fE75EdCFb94f1a8A4A741b443] = 10; reservations[0x88451FDbdb2d002008136D3626aafdA5e85d4dae] = 5; reservations[0x52713267FE99E268A3Ce0B1A84C3d3dbC7C47F21] = 5; reservations[0x6D938CbE86b4763691f702577d4046F656aCb3c8] = 5; reservations[0x6051BE619c976Bf24ff6053693f696C691cfCd24] = 5; reservations[0x98367D7B9bC02A5207859Ac11F2a9E504cA729E4] = 5; reservations[0xb7608C42C00c87Be4Db7A6D2AF128fd6f0FD74c8] = 5; reservations[0x99999990D598B918799f38163204Bbc30611B6b6] = 5; reservations[0x905f48CbAAAF881Dbee913cE040c3b26d3bbc6D9] = 5; reservations[0x020B899981FA12ad33d6c455d77fe8f53A121464] = 5; reservations[0x5c0E408F03709B89b7F5Fa91E4172425F57C75d2] = 5; reservations[0x51EDb6E986c31D13838f165737Fe3FbA9F689F38] = 300; reservations[0xd6b5E55dd4BEBe68D556EaB12C9916bD4a420406] = 30; reservations[0xd148C895462160a260318A7046f78a29F97F8235] = 30; reservations[0x7156403C0A30d458Bb4b4796e4412E6A22624b30] = 10; reservations[0x13E47EBD58dA3a23ed19d91067168896e6c683F1] = 10; reservations[0xC0f1C68f16363974FCaCE9f25DC76a18B5077a9A] = 5; reservations[0x749C34697bA3ECbbD80C0BD831F513DFD9E2D5a4] = 2; reservations[0xF61AC83177e310e82374f90D5dd00f62FDeA2FBD] = 1; reservations[0x1fC18f965F60625f895434FC536Fa50c705F860c] = 1; reservations[0x9191588a8F3fa3ffF4f7e4D1ca51034d664850FE] = 1; } }
// SPDX-License-Identifier: MIT 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 no longer needed starting with Solidity 0.8. 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 substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./ChubbiReserve.sol"; /** * @title ChubbiAuction * ChubbiAuction - A contract that enables tokens to be distributed using a Dutch Auction. */ contract ChubbiAuction is ChubbiReserve { using SafeMath for uint256; bool internal _isAuctionActive; // Events event BidSuccessful( address indexed owner, uint256 amountOfTokens, uint256 totalPrice ); // Auction parameters uint256 public startTime; uint256 public maxPrice; uint256 public minPrice; // The amount of time after price will decrease next. uint256 public constant timeDelta = 10 minutes; // The amount of eth to decrease price by every `timeDelta` uint256 public constant priceDelta = 0.05 ether; // The maximum amount of tokens per bid uint256 public maxTokensPerBid; constructor( string memory _name, string memory _symbol, address _proxyRegistryAddress, uint256 _maxSupply ) ChubbiReserve(_name, _symbol, _proxyRegistryAddress, _maxSupply) { _isAuctionActive = false; maxTokensPerBid = 20; maxPrice = 0.69 ether; minPrice = 0.09 ether; } /** * @dev Set the parameters for the auction. * @param _maxPrice the maximum price of a token in the auction. * @param _minPrice the minimum price of a token in the auction. */ function setAuctionParameters(uint256 _maxPrice, uint256 _minPrice) external onlyOwner { require(!_isAuctionActive, "Auction is active"); require(_maxPrice > _minPrice, "Invalid max price"); require(_minPrice > 0, "Invalid min price"); maxPrice = _maxPrice; minPrice = _minPrice; } /** * @dev Set the maximum number of tokens a user is allowed to bid for in total throughout the whole auction. */ function setMaxTokensPerBid(uint256 _amount) external onlyOwner { require(_amount > 0, "Invalid amount"); maxTokensPerBid = _amount; } // Start & Pause function startAuction() external onlyOwner whenNotPaused { require(!_isAuctionActive, "Auction is active"); startTime = block.timestamp; _isAuctionActive = true; stopReservations(); } function pauseAuction() external onlyOwner { require(_isAuctionActive, "Auction is not active"); _isAuctionActive = false; } // Bidding /** * @dev Get the maximum amount of tokens that can be auctioned. */ function maxAuctionSupply() public view returns (uint256) { return maxSupply - claimed; } /** * @dev Get the amount of tokens that have been auctioned. */ function tokensAuctioned() public view returns (uint256) { return currentSupply() - claimed; } /** * @dev Check is the auction is currently active. */ function isAuctionActive() external view returns (bool) { return _isAuctionActive && tokensAuctioned() < maxAuctionSupply(); } /** * @dev Bid for tokens. * @param _tokenAmount the amount of tokens to bid. */ function bid(uint256 _tokenAmount) external payable whenNotPaused { require(_isAuctionActive, "Auction is not active"); require(tokensAuctioned() < maxAuctionSupply(), "Auction completed"); require(_tokenAmount <= maxTokensPerBid, "Bid limit exceeded"); // Ensure that user can always buy the tokens closer to the end of the auction uint256 tokensRemaining = maxAuctionSupply().sub(tokensAuctioned()); uint256 amountToBuy = Math.min(_tokenAmount, tokensRemaining); assert(amountToBuy <= tokensRemaining); // Ensure user can afford the tokens uint256 totalPrice = getCurrentPrice().mul(amountToBuy); require(totalPrice <= msg.value, "Not enough ETH"); // Give them the tokens! for (uint256 i = 0; i < amountToBuy; i++) { _mintTo(msg.sender); } // Let the world know! emit BidSuccessful(msg.sender, amountToBuy, totalPrice); // Return the change uint256 change = msg.value.sub(totalPrice); payable(msg.sender).transfer(change); } /** * @dev Get the current price of a token. */ function getCurrentPrice() public view returns (uint256) { if (!_isAuctionActive) { return maxPrice; } return _getCurrentPrice(startTime, block.timestamp, maxPrice, minPrice); } /** * @dev Get the current price of a token. * We make this virtual so we can override it in tests. * @param _startTime the starting timestamp. * @param _currentTime the current timestamp. * @param _maxPrice the maximum price of the token. * @param _minPrice the minimum price of the token. */ function _getCurrentPrice( uint256 _startTime, uint256 _currentTime, uint256 _maxPrice, uint256 _minPrice ) internal view virtual returns (uint256) { require(_maxPrice > _minPrice, "Invalid max price"); if (_currentTime < _startTime) { return _maxPrice; } // Drop by 0.05 eth every 10 minutes uint256 priceDiff = _currentTime.sub(_startTime).div(timeDelta).mul( priceDelta ); priceDiff = Math.min(priceDiff, _maxPrice); return Math.max(_minPrice, _maxPrice.sub(priceDiff)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @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 / b + (a % b == 0 ? 0 : 1); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./ChubbiBase.sol"; /** * @title ChubbiReserve * ChubbiReserve - A contract that allows token reservations and claiming. */ contract ChubbiReserve is ChubbiBase { using SafeMath for uint256; // Events event Claimed(address indexed owner, uint256 amount); uint256 public claimed; // A mapping from addresses to the amount of allocations mapping(address => uint256) internal reservations; bool internal _isClaimingActive; bool private isReserveActive; uint256 public maxTokensPerClaim; constructor( string memory _name, string memory _symbol, address _proxyRegistryAddress, uint256 _maxSupply ) ChubbiBase(_name, _symbol, _proxyRegistryAddress, _maxSupply) { _isClaimingActive = false; isReserveActive = true; maxTokensPerClaim = 50; } /** * @dev Get the reservations for a given address. * @param _for address of the owner of the tokens. */ function getReservations(address _for) external view returns (uint256) { return isReserveActive ? reservations[_for] : 0; } /** * @dev Check if claiming is active. */ function isClaimingActive() external view returns (bool) { return _isClaimingActive && isReserveActive; } function setMaxTokensPerClaim(uint256 _amount) external onlyOwner { maxTokensPerClaim = _amount; } /** * @dev Claim all reserved tokens. */ function claim() external whenNotPaused { require(_isClaimingActive, "Claiming is not active"); require(isReserveActive, "Reserve is not active"); require(reservations[msg.sender] > 0, "No tokens to claim"); uint256 numberOfTokens = reservations[msg.sender]; uint256 numberToClaim = Math.min(numberOfTokens, maxTokensPerClaim); reservations[msg.sender] = numberOfTokens.sub(numberToClaim); claimed = claimed.add(numberToClaim); for (uint256 i = 0; i < numberToClaim; i++) { _mintTo(msg.sender); } emit Claimed(msg.sender, numberToClaim); } // Pause and unpause function pauseClaiming() external onlyOwner { require(_isClaimingActive, "Claiming is already paused"); _isClaimingActive = false; } function unpauseClaiming() external onlyOwner { require(!_isClaimingActive, "Claiming is active"); _isClaimingActive = true; } /** * @dev Stop all reservations permanently */ function stopReservations() public onlyOwner whenNotPaused { _isClaimingActive = false; isReserveActive = false; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./opensea/ERC721Tradable.sol"; contract ChubbiBase is ERC721Tradable { uint256 public maxSupply; constructor( string memory _name, string memory _symbol, address _proxyRegistryAddress, uint256 _maxSupply ) ERC721Tradable(_name, _symbol, _proxyRegistryAddress) { require(_maxSupply > 0, "Max supply must be set"); maxSupply = _maxSupply; } // Override mint so that we cannot go over the maximum supply function _mint(address _to, uint256 _tokenId) internal override { // Ensure tokenId is in range [1, maxSupply] require(_tokenId > 0 && _tokenId <= maxSupply, "Invalid token id"); super._mint(_to, _tokenId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./common/meta-transactions/ContentMixin.sol"; import "./common/meta-transactions/NativeMetaTransaction.sol"; contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } /** * @title ERC721Tradable * ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality. */ abstract contract ERC721Tradable is ERC721Enumerable, Ownable, Pausable, ContextMixin, NativeMetaTransaction { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; address internal proxyRegistryAddress; string public baseTokenURI; constructor( string memory _name, string memory _symbol, address _proxyRegistryAddress ) ERC721(_name, _symbol) { proxyRegistryAddress = _proxyRegistryAddress; _initializeEIP712(_name); } function setBaseTokenURI(string memory newBaseTokenURI) public onlyOwner { baseTokenURI = newBaseTokenURI; } function tokenURI(uint256 _tokenId) public view override returns (string memory) { return string(abi.encodePacked(baseTokenURI, Strings.toString(_tokenId))); } /** * @dev Get the amount of tokens that have been minted. * NOTE: This is different from totalSupply() as this won't decrease the supply count on token burn. */ function currentSupply() public view returns (uint256) { return _tokenIdCounter.current(); } /** * @dev Mints a token to an address with a tokenURI. * @param _to address of the future owner of the token */ function _mintTo(address _to) internal virtual { _tokenIdCounter.increment(); _safeMint(_to, _tokenIdCounter.current()); } /** * Money functions */ function withdraw() external onlyOwner { uint256 balance = address(this).balance; payable(msg.sender).transfer(balance); } /** * Pausable */ function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override whenNotPaused { super._beforeTokenTransfer(from, to, tokenId); } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { // Whitelist OpenSea proxy contract for easy trading. ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress); if (address(proxyRegistry.proxies(owner)) == operator) { return true; } return super.isApprovedForAll(owner, operator); } /** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea. */ function _msgSender() internal view override returns (address sender) { return ContextMixin.msgSender(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @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 { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_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); } /** * @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); } /** * @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 of token that is not own"); 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); } /** * @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 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 {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @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(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT 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); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { if (msg.sender == address(this)) { bytes memory array = msg.data; uint256 index = msg.data.length; assembly { // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. sender := and( mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff ) } } else { sender = payable(msg.sender); } return sender; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./EIP712Base.sol"; contract NativeMetaTransaction is EIP712Base { using SafeMath for uint256; bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( bytes( "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" ) ); event MetaTransactionExecuted( address userAddress, address payable relayerAddress, bytes functionSignature ); mapping(address => uint256) nonces; /* * Meta transaction structure. * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas * He should call the desired function directly in that case. */ struct MetaTransaction { uint256 nonce; address from; bytes functionSignature; } function executeMetaTransaction( address userAddress, bytes memory functionSignature, bytes32 sigR, bytes32 sigS, uint8 sigV ) public payable returns (bytes memory) { MetaTransaction memory metaTx = MetaTransaction({ nonce: nonces[userAddress], from: userAddress, functionSignature: functionSignature }); require( verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match" ); // increase nonce for user (to avoid re-use) nonces[userAddress] = nonces[userAddress].add(1); emit MetaTransactionExecuted( userAddress, payable(msg.sender), functionSignature ); // Append userAddress and relayer address at the end to extract it from calling context (bool success, bytes memory returnData) = address(this).call( abi.encodePacked(functionSignature, userAddress) ); require(success, "Function call not successful"); return returnData; } function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) { return keccak256( abi.encode( META_TRANSACTION_TYPEHASH, metaTx.nonce, metaTx.from, keccak256(metaTx.functionSignature) ) ); } function getNonce(address user) public view returns (uint256 nonce) { nonce = nonces[user]; } function verify( address signer, MetaTransaction memory metaTx, bytes32 sigR, bytes32 sigS, uint8 sigV ) internal view returns (bool) { require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); return signer == ecrecover( toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @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; }
// SPDX-License-Identifier: MIT 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @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; } }
// SPDX-License-Identifier: MIT 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @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 tokenId); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./Initializable.sol"; contract EIP712Base is Initializable { struct EIP712Domain { string name; string version; address verifyingContract; bytes32 salt; } string public constant ERC712_VERSION = "1"; bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( bytes( "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" ) ); bytes32 internal domainSeperator; // supposed to be called once while initializing. // one of the contracts that inherits this contract follows proxy pattern // so it is not possible to do this in a constructor function _initializeEIP712(string memory name) internal initializer { _setDomainSeperator(name); } function _setDomainSeperator(string memory name) internal { domainSeperator = keccak256( abi.encode( EIP712_DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(ERC712_VERSION)), address(this), bytes32(getChainId()) ) ); } function getDomainSeperator() public view returns (bytes32) { return domainSeperator; } function getChainId() public view returns (uint256) { uint256 id; assembly { id := chainid() } return id; } /** * Accept message hash and returns hash message in EIP712 compatible form * So that it can be used to recover signer from signature signed using EIP712 formatted data * https://eips.ethereum.org/EIPS/eip-712 * "\\x19" makes the encoding deterministic * "\\x01" is the version byte to make it compatible to EIP-191 */ function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) { return keccak256( abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Initializable { bool inited = false; modifier initializer() { require(!inited, "already inited"); _; inited = true; } }
{ "optimizer": { "enabled": true, "runs": 8000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_proxyRegistryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOfTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalPrice","type":"uint256"}],"name":"BidSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","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":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"bid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_for","type":"address"}],"name":"getReservations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAuctionActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isClaimingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAuctionSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokensPerBid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokensPerClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseClaiming","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceDelta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPrice","type":"uint256"},{"internalType":"uint256","name":"_minPrice","type":"uint256"}],"name":"setAuctionParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseTokenURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxTokensPerBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxTokensPerClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stopReservations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeDelta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensAuctioned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseClaiming","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600a805460ff60a81b191690553480156200001e57600080fd5b50604051620060f5380380620060f5833981016040819052620000419162001ebe565b8282826122b88383838383838383838383828281600090805190602001906200006c92919062001d65565b5080516200008290600190602084019062001d65565b5050506200009f6200009962001af160201b60201c565b62001b0d565b600a805460ff60a01b19169055600e80546001600160a01b0319166001600160a01b038316179055620000d28362001b5f565b505050600081116200012b5760405162461bcd60e51b815260206004820152601660248201527f4d617820737570706c79206d757374206265207365740000000000000000000060448201526064015b60405180910390fd5b60105550506013805461ffff19166101001790555050603260149081556015805460ff1916905560195550506709935f581f050000601755505067013fbe85edc90000601855505060408051606081019091526027808252620001989250620060ce602083013962001bcd565b5050601260205250600a7fe25414ffd44639f76b9da7c1194db1c132fdb76d3c55cb987bc15ed1bd4ea8bc81905560057fca31409edd2ee77fb8d60636bb7b0760a3f3af1e1f4f18ace58ff9fa9e3618978190557f0549b78db1879f5615cee3329d093d4643be7b51f46b7ff1f4e543cd167b0cc18190557fb7814b2656120db73dbf331b3f23138d7e52322f02a23a5bbb453cd6fe15ee768190557fc27c32d4e62452316ed97a5b841ef092785cecac5b83f8d7d6e44c08096f196181905560327fdf2d050b7400be8e03cf18cd61244140bdb2452d7bf605bb69c01a65bd6d8262557faa09bddcf5bb931ad3dc3690e3cb83bd5f888667594229e7a971d7458c6cf77b8190557fdaf89d88a089207296e10169744cb3bffcb422df0aeeca343c7bb658b298ed898190557fcde6181f7746006c7bb814f792bef5dafd6e4de1d74d8b28915482c920c143768290557fae89ac823da5efa77cec9657a84873a95123e260dcb7373ce9220dacd624c5c1829055600f7f5290b3022c1c3e4e1c3adf7a6cee217734014fedefba774f56d22866a525016f8190557f5982a56f7a3af8a6c3d69937a55bc5f3ee3d3ad118a26288a0aba74743c827df8290557f0d04415fcfd4e9fadee29975056a3abc747b6ddb279c31a70e808a706afbda4783905560147fbaddaddce2f0c05ddebbd45c8c9a12c718caedd40df4544f2ae7e4387cddf5a88190557f51b7695f4da79192ec07b5f5644c7d1fdacfc31b8dd9efbf592b84848f77d7bc8390557fb1166b5aadf24fb874d7ed755969d6454958524425abb2114a040f27db1dc7718390557f7ba70a1afc55a50df4fbf716aa3e2e2881543714e76daff3648a465c90dd0db78390557f8cc53bc7175488aa08e26c8f24f1afe782dd36424503639ef7a803007022b5fc8290557fa579ba94c0e39d0c7dfbfea62b8c1212f12387fa8d1a6f6aebe52217183611918390557f682332a1fb61f1ed9e12b4b9929b1eb156f31f158bbd6d4dff780156de2f3dc183905560287f2c5610026be8b5b4f83818d3c54032938fe0d076e86e974f131e84d7832d5488557f8d555c60608bbe482db60060210a2ec0538aa2a51a3319ccd48886ca028589948390557f905d2fe6f10e8aed87d5b5beb0e226f736c521226b547047e060a40c6f2335e08490557fc1d96b124b059d313ad150050116e21c6e696b2b8d7aa117496f680bb887bb8a8490557fca3eb05ac0f9bdf6e0b060cf6a559fc956cc13c965249442e67fa65d9e3a038d8390557f8cd7f2051eb5f996f0efdc3145cbe8c9f0910f213a2d59ac7c87eeb22b36ca598290557f7da77d3f7d9bda11650e93ddea72ec0a4184010d03e7fde4b4b5d00dd5064e9c8390557f623578421891b746c3f4ff0d8947a8e99efdbaf0463661e6d0aca0b212d237e58490557f3fdaf3bacf917173ffcf3393172d721c7f4f64d3e545afe2ffe156100a01db5784905560197fb7dcc35339558a0cb757fca04d9ffaa5074b6ab513da5ff75e0b48c151cb28d78190557fa043f69898b6a220e10c9dbdd3fe46063f3614fa9c757cc06647c0ba7580ad928490557fc3035c483981c217f8ef251b9da98ba42d1a4ca9be0d56aef2211235d5fc8ec28490557f54f88b4533185d0f13ca17a51f62b4b73bc2defc887281bda8b79d918ae4339d8490557f0ccf7ab638c4a5fad14293e89b744026617f9dbea746af6a175ef975e8ea41be8490557f273515cd028648864eae0944170d4f8c091fd1b3d3daed19f27f5eb16099ea828590557fe2a4fd5033886e933bfd7d6b81af02c342f767a1561ec352cf119166eefcecc98490557fd9b632c78aac08e9d5ee367138425e90802f166223f0e13ca744c31dc8efb7d18490557ff8df19b162df62c969c3572ef0f0e6425820f8f4ed84bcd932b7dabe93f6d27d8490557f1328729d3d3daa51088a7d80da65532064a9b251092b8b990049f3a207c343548590557f90adb0b427ca7565467caf86f7b96b35efd6e2bb8d0d0d32f63bf65ab2617d3c84905560237fd794511c2f2cba650079a595879f885957fd8bedc1b8485b937e85efde333ae0557f3b450933476d71d2a876aed06641c172a5b4ef4fbb4f4b2491df335d5f1fb8ac8490557faee2c88b6fac4efa3594495037ca32599b1a0fd7d0abe15f7094f47afb2a8b618590557fe0bf1b13acc08a1181c84f3c07a0b15b2b89dfa8f51c9b49370de1e64207695c8590557fc5bcc659c972d04457f95651eb7ae343de5533c6a60340834b937a9bc52725b58490557f6ed61321ff2818183048640b47067a9ff8a22ced2bc72a366c9213e2024747d88490557fa344a6ae4eb3bf35569541aa0d07c5b466e7af08970c80e914276555851a385b8490557fec590b2069c6dfc2d8effe0c4ea66e3eda546eb95884920e44b3a13e04e2afc58490557f9f9397b32600048744e1379446dbf5bcaacb5e50c627ba590d082e58986609ef8490557fbf9aee41b7218921cf2c73f53b626795fcd5c5cced1e584b7eae059e5accf2008490557fff43776c672263c2e20c1afadeb8a0f63d360e798da4a48d2ab0c785ca1861078390557fa9f7c00ad544154184009f90b60d9fc83cf4449031a2ec2eac79e3ae5361f6b28190557f2d63f15246516a2ea21663fdf8d6a79c89c0012c10d494e92a751e7c505571f58590557fbd635b861b2bafef71cad684aade4a4864e85730b93f3f34317e73b94e11b3458490557f30f80e3d9f5baaf3f59e2843f6cee184d05fd376da13d62d95213a79e8e1e0f7557f635164a7899e26a9b855d841e0cd82cf066565f27e78e6ed3d408ace2f796ee88390557fe0e06705cb807b88fbb26f9eb9afcd0dafd62b44d5efdbe1e282de728c5cc9f08390557f13b6bfbcfaf255e235311149d45cf8f2113757ac493cfc88cc5128afaf18c2f18490557fd7fb06d25e8cbebb039e4a3f314ed706e0745b99af9b81689cd251683bd8a02a8490557f9f598f420f1194197f237451ded29d1bd0fdb6e6c6bd53250c3891bbf45cf3428390557f5ac04e5ba0790292bc64cbce4a2f7dc3f1e42fff77116a50063cb958ecc880c08390557f60f688f3470508c5ba4bed6a89c63c0f7b4c71279522298e20227ddb25ebc8598390557fd548f7e56247b141498e6893a271cd93c6e7cbac8c1eb34a6689c07b850c9f0e8490557fe3bb459e1a276863b98d41a4a5a5bae85d3f3be3102b215f7f71b094663e82bd8490557fe8bd9c8f69c0ffa5954026ce3d29d196106d62ca8eb75db090ad5559e59a23c88390557f79589bb5796432eaa2ad6d0eaaf06f9eaaf3d890bc86d51e967d200a25385fdb8390557fd68f8f296cd84b7f715af05abcdcde065209f136e21a006a7c22d0661c0edde58390557fcba3370e2e978c6dd1988c76fe8954c3605fa49791034a873b574daea80b16478390557f8c8cd36b689f2b0ddcc3ce11ed40c78f2a983798c03fa59c18ba8614a935ae388390557fe89cb39b6626181c03eec9d4b85125fbbbec031b9b71fb46075dfa231d8e8783849055602d7faa1e9c40449127fd543b9c0d4daa9c9eb033736b0787d0b11c1c7b6c0945b881557fd088e197009cac8c588ade8115313e5a4440e7dc836ded3a4eda8a1b6c0041768390557f5dba6d72f8d4af638fe2fe49edcd3fe3bf4e954b970227d3d51e6bebca29dfef8390557f5e0c08d5121bc07cf943031565283b63fdea38bf5ca48a2f64afbc3f3029abec8490557fdb96b7408f4af825cf65e43a69e3f5f3fe7a55746bb7cf69cc3608acd4b06e2f8390557f1d459f79862f78bdd02a61527491df09f3ef10774ac802ee61fdfc18270aa6b88390557f99d7a4e8d70bdfda6b1a9c37f013870556e8b507a2deeac383ecac4ad1e97c278390557fdf31c971c73f29a0c14ba4a06c1edba3aeb4c34aec3ea8f650f719d123696de08290557f76b76b06ee20d3d0136234984f67150b89f8d295af665f318e1f97af66ff337d8390557f0f892180e2c5234f4779d8e8a101539a59f941af7a8ad996b400a8cc962cec1c8390557fbe3977aaabfdae3a79ea93702d5ff1eec04a656a8f71993390228b629758ed3a8390557fd096f1153f3145c73ba3ad38a299943e57296d9e2c79e976f79928bac65d49a48390557f0568fd992ffbebd4ffbd3f6640be95a0a284b28b4df9f4212ce07d7c976c84758390557f1a5465911c40d4793e545952705ede04557cee10649476e44a80d9083693739e8190557f234dbd675d352739f31e301b4cd633b72d4586fc2e7f0f869c72ddeef615b5b08390557f632fffee2476fed617ab6d007fc2002e268811c427ce880aa5799c75f8e548728390557f8056be8dc1b6c3e81193071e784825d3f1144675d191a1d0ec5ac638b973cabb8390557f45587f26728f5bb8eff7382dbcd53443be0f2cdfe89e36bd379e4db0fe0b44b18390557fbc82edf5263876fb3ce81b6b20038be342c89baf9e1b794890d935ce28aebc978390557f0f0a8b1c3729525f9bddb8078ab834f788251a124ef2a962311ca1d5da3ee6c58390557f5c835074ed7bd533df4c8a1d2b31eab3eb0563237e849e3089d8178f0e6e3ac78390557fded6f1daceea4f25523e66eae5b34e5ec6bd63d8a79dc4b6c205709cb98665888490557f2ecb6564ff3fb3ec438deb93aafe97f69e85fef05e1b452a472769367a685ee99190915560087f652db23d7b4a9f3f80e3726dd9f3eac00a25834e96eeb201c83187737b75c44a557fb5c69367a7a7cb4fa94d54e9fb58eb05d931f49bb5c223bec29cba22308359618390557faf112819f34e56390b7347a0887a69d7e6f27a959432da0e017a573cdc1c3bf78290557fafea02485af4bf42fb41b0c98f2af434bb8b27ce881985f324bdac1da32c70f28390557fbe92e47e2d9e82f2ecca9975a2999cc14e3966e13e14fbc3863676c1edfebc0a8290557f2fc5007734210894449899cfde4e3bc29ad41ad5a9a0dc11c926b56787f139bf8290557fd7665b0c6aa5ed5b1d0ff9cea7b5c9862e70076274290ed814b6d224764c7f8a8290557fd7ceb74618e83da30387ca3e02b8d338886d2f088cd1d2267dbe5b2fdb77ee818290557f1338af6b1c62aea0c1e30357abd95faf7b50af9cea4a1f5b71172f1030032dc18390557fda6924fbdba3014fd2452369eeba864193668b4074a41f21a49b4942f924a7208290557f67c9decfcb1057fdd5fa6293ed8b02a26a5e50f236cc6afe10b7b8d3cf2404c58290557f1b21fdbb118eed4575bbea0bae9875f6d8497518ab2973fbaeb7fdd57578fb128290557f81c445e8e745b4ab010fe3218f7d9687f00d368aab0fb40aa59ccbac4622b1a28390557fd69d72a9de8e333bb4a2a2201f4fd51776c8dcefb0da6f86cbecd33f66ad547e8290557ff59014990f7855cd40913e0d027623b30992fda8e37fd0783809559b13fb07498290557fa0e23b9ccf30bfe47ee03e21eb6b2a23745b17fe7279b2befc254e16e8814c958390557fc7fc1c45d3c427167247a86c774c3102bb9e028b6e936333405c52e181af2dd08290557f4bb082961980f737cd0588fded02b5ce0f0bade0e22d25e20666ae2de2431d648290557f1bd7e9b9ad2a98938c98ca2522723182530640ac1d9addc42766c6544c09dbbe8290557f8915512a57d0efa841b5720f4a32091ff574a3f1832ec9655dd3e418a8e8e6728290557f12e47efded509bb1aa3adc23df1e1ae7d810ba764c495497a8ae4c84596bb0b08290557fa17c4d2c70857241048a15a58d45159f6e7e0047363955b8982af1e78c12ade38290557fe7475978a748a2c23c19a89c4a7b81f193f40180e6df0a89897b642082b3cce28390557f6153b33238116112a98e942c68f2a21db96e58b7e53a9230514e756299771b118390557fe5225d8431e38f8fb31af75fca8667de36c235e716e26070d0524e956d16e1aa8390557f7b3732be4a8ba4477d3354d852ca7f7782ee8f2b14e94c69bfb40820958981678290557f0865bd606fc5edf5afb8a1c996b29518213fc7f9303e4211a14d61d07ecb89fe8290557f75ed8a72d8a2d8dec8565b64d4ce6fd53f107748583e1e0eda1ca8a254d826bb8290557f63ee16b70017486a8ed87ac994052f1e9a9aefe4042f66ff41f4e0ea0f68d2bc8290557ff83a1352df08335c860a369666f8270c0dd9e6696d50f25df18769fc89ec97718290557fec1331bc30bb94798cdb86a632232d081e7d5c17a82fec9ff27545dd9d089883557fa0c97b46a2da9209fda8ca68ad8b0c5da581bcbab56fe9d0be549d571b9f81518290557f0ccbff92b1029790bfebb1edc845d91d63226f335ce82c645947683f1cc337ed8190557f0e1b76eb59da5d8c928fa7fc4b8cc1df3d5caeb52169cb5ee60f338c284671ff8290557f8d264fde62612fa4ec5a80bbfa5fdf5005a60c5ef8d375ce6564c05c7fdb57cb8190557f1fe8f4bceda56fe7b23eddc0d2ee57196cbfde03f480e7ed7c05d485678a27da8190557fe20bd5d55fd4dc51d7fa0a7a2a346506358d22cc9aaffcf386a0a917f71f0d0d8190557f9f6022bf4fb0e6b96f22cd222466af8323309d1bce24b038759ba6056c96257b8190557f1ce74cfa312b168b6719a340333a900c9da298386f57ce30e5fa4b6b571f3d248290557f7f3119321155ed39a9b77eb3d5ac113b608a7dd834b186879d17b1bb5e785bcc8290557f5c329243d6a7d414813d6ba47df1a639dd5c6076582c4be60feffe053e9be9048190557fa3a6eb26facaa563a43eeec546216e7093ddc3dff908ae0abc50b6eb13be8c9c8190557fee77a5aa567a22b6fa76f6408705bf42a118ed33d6d11a5c0ac5944cb5844ed68190557fec7c610f64a8dbece0282898e0b9136134aff98d0ff19c480638455ae36cf62a8190557fd884e91ec1edbf9d31b787ecc159a27b3e4206ae4b70245493af1356acb398c78190557f6a90e4e0378e8301d583e42f2a008d83180c92d5434b043e2021bd7758d1c19b8190557f0e0e61b930fa98d82a8a729eab628b949efc75a06b2a945070f379b1769980578190557f20461e26353c24dab388f2e6bf1b3ba271d023f47412de0c88f1f0b5c90bef378190557fdd802ba7dbf666f707ceed42089707e1baee54d4bb52d780d1dfabd829fa69988190557f3c9a34bd91a55eaa8219065d42ab88f7713c967335666db515cd98c43c1314c18190557fab329456c7429361bade399cdb326a025c92d90ac135566368c54a28605d50678190557fca108af6e78d3f4730ae37f7b30ea220b759840125230cb13c0bdfd5f60b319b8190557f662397cdeac545d2e93e87ab34d3a8a523d6e6f27b6ca5277c90d90d6e8c32468190557fd686e7e975a6ed0604b404934a769916e87e1f5613bb2d4ebf4d7edc02ac96e48290557f6ba90223e3edce9b7e6c22bb84de4462e27c71e19fdcdf812979f1677466df6f8190557f34faa0527d48cdd1c21fb446b44250f49daed2e44d152efe83b8a73c3c0bee908190557fd62d8f1b821ee13e7a30838bfeb8833adad30e4768214b274215d1ed9d568e8b8190557fc5e158148d22a02b0590972e2abcd052871c2c4f5c8d5368a8191a97d865926a8190557f7aa3863dcad3659a651e6820bfd4769562120d983eea6b6b1a323f729bd7865d8190557ff0255f3f49d6b9c1caba253e2a053d67cc5a9b7f2cef2461c8336ea0c1913e668190557fa970759ada662a850b711da33a7690542383a7214cbe2bae0e8eb91b21b714a38190557fc8062ec20929e2b9d1d5d96845e276cd952dd30c7817f87a8ff31a2764a0ebea8190557f1f0aeb26e6ea194a4072a98dcfd2d97672cb6ba85d4414e29d608a7624133d088190557fffb768f3aa19777fa397442b8948f9229b80101bd5d518ed581895cf0e2ddfb38190557f8df5799c8303753437fbb0d5a67569f2a19dbbd9e6772e038c52627a105e69ae8190557f2642f22d3f21bd178e3cf1c691bb48de0a05ca317a822cf4a58ffa6a2db327258290557f8b6bc30ac59270edb66c4a28df5997aeadde474438c8e09a75b06b6537c7faa48190557f9d38741be5b26721e46667bda4dbfcd25d3c724101a9eaf7e053e120645f4c6e8190557f91d4de46a4d23808a65f10e4dacda360d8bf7290df0e751ce120bdf6a4f171b98190557f8ca3af7305bc9031c816e0a9dfe994b8e4539e0471f131b749273092d3e32cff8190557f962873d846ee4a5925c2e01111b9fc5b2a0b50ded74d4dbb74af7765f8eac1758190557fa3e8b77789851055c31c09b75fda5fdc1e04a53b6248051a778fcb81cf8c1c138190557f881e0fb090d728693ac4153bad168ee468c0b94adc0506177c40451f0cb725a38190557f8df5a27363ea5a06d5602e0a1c668761b93b678c6c607800bb5d0e951e60e0368190557fed514bdd1cc24de67f3d79b53a6162ba57504ca06b02da0f5224465822cd96428190557ff2c776fba93e81f3bac4c8931452fa74b4f58d33cf8a03f4410604ca92abbcf681905561012c7f0eab8e1903dfdea0e8fc852aba8675a66cd36fbd2f8a7b40c10c299abaacac5655601e7f64ea3e329e787ef2f3febadf25e742d81191a5a249e16631f86f9d72d635ee618190557fd101bd3acadc68770b68227539a4b0882152eb3aabc7b3695e2107dbdaa4631e557f548560404d46af071084eb117dbf370929dfaece258245604bbb7d4a53e801bb8290557fc182b98e7fb2cfadfe15528279ae28a13e1447c4d3d62a4d24c6e2ac2c6b3c41919091557f85d062555457a86f235cb8a514569fcacf94ad0cd9675de089dc3de55b2ba68f5560027f1f9f0e66f5e4c4f373159c905426f311314b9ea669dddb5543f121157e0c7f725560017ffbd097769a6abf46754e5af7e0462f5a537762a398e7942c034460e81cf3c13a8190557f674490af6fee33697bf205cecb071cc2407fa4268bd54d1d26d845cad1fa73d3819055739191588a8f3fa3fff4f7e4d1ca51034d664850fe6000527f552d1703bafb96e17bb8c2b7c904a0f8f9ce68fb1542d4f209fd69ee5324e1ae5562001f9a565b600062001b0862001c6460201b6200263b1760201c565b905090565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a54600160a81b900460ff161562001bac5760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b604482015260640162000122565b62001bb78162001cc3565b50600a805460ff60a81b1916600160a81b179055565b62001bd762001af1565b6001600160a01b031662001bf3600a546001600160a01b031690565b6001600160a01b03161462001c4b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000122565b805162001c6090600f90602084019062001d65565b5050565b60003330141562001cbd57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b0316915062001cc09050565b50335b90565b6040518060800160405280604f81526020016200607f604f9139805160209182012082519282019290922060408051808201825260018152603160f81b90840152805180840194909452838101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608401523060808401524660a0808501919091528151808503909101815260c090930190528151910120600b55565b82805462001d739062001f47565b90600052602060002090601f01602090048101928262001d97576000855562001de2565b82601f1062001db257805160ff191683800117855562001de2565b8280016001018555821562001de2579182015b8281111562001de257825182559160200191906001019062001dc5565b5062001df092915062001df4565b5090565b5b8082111562001df0576000815560010162001df5565b600082601f83011262001e1c578081fd5b81516001600160401b038082111562001e395762001e3962001f84565b604051601f8301601f19908116603f0116810190828211818310171562001e645762001e6462001f84565b8160405283815260209250868385880101111562001e80578485fd5b8491505b8382101562001ea3578582018301518183018401529082019062001e84565b8382111562001eb457848385830101525b9695505050505050565b60008060006060848603121562001ed3578283fd5b83516001600160401b038082111562001eea578485fd5b62001ef88783880162001e0b565b9450602086015191508082111562001f0e578384fd5b5062001f1d8682870162001e0b565b604086015190935090506001600160a01b038116811462001f3c578182fd5b809150509250925092565b600181811c9082168062001f5c57607f821691505b6020821081141562001f7e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6140d58062001faa6000396000f3fe60806040526004361061036b5760003560e01c80636757ac1d116101c6578063aad2816e116100f7578063de4cf6f611610095578063e834a8341161006f578063e834a83414610939578063e985e9c51461094f578063eb91d37e1461096f578063f2fde38b1461098457600080fd5b8063de4cf6f6146108f8578063e38d6b5c1461090d578063e45be8eb1461092357600080fd5b8063c87b56dd116100d1578063c87b56dd14610898578063d1b4b9a3146108b8578063d547cfb7146108cd578063d5abeb01146108e257600080fd5b8063aad2816e1461084e578063b88d4fde14610863578063b9ae73641461088357600080fd5b806378e97925116101645780638da5cb5b1161013e5780638da5cb5b146107e557806395d89b411461080357806395e8bb2314610818578063a22cb4651461082e57600080fd5b806378e979251461079a5780637fdd5e8e146107b05780638456cb59146107d057600080fd5b806370a08231116101a057806370a082311461073a578063715018a61461075a57806371a64f161461076f578063771282f61461078557600080fd5b80636757ac1d146106f0578063678212d9146107105780636b64c7691461072557600080fd5b80633408e470116102a0578063454a2ab31161023e5780634f6ccce7116102185780634f6ccce7146106655780635bfa896a146106855780635c975abb146106a05780636352211e146106d057600080fd5b8063454a2ab31461061d5780634e71d92d146106305780634f0996ba1461064557600080fd5b80633ccfd60b1161027a5780633ccfd60b146105be5780633f4ba83a146105d35780633ff8035b146105e857806342842e0e146105fd57600080fd5b80633408e470146105815780633732ad1c14610594578063384d2084146105a957600080fd5b806318160ddd1161030d5780632781602b116102e75780632781602b146104f55780632d0335ab1461050b5780632f745c591461054157806330176e131461056157600080fd5b806318160ddd146104ab57806320379ee5146104c057806323b872dd146104d557600080fd5b8063095ea7b311610349578063095ea7b3146103ff5780630c53c51c146104215780630f7e597014610434578063132a98c01461047d57600080fd5b806301ffc9a71461037057806306fdde03146103a5578063081812fc146103c7575b600080fd5b34801561037c57600080fd5b5061039061038b366004613bed565b6109a4565b60405190151581526020015b60405180910390f35b3480156103b157600080fd5b506103ba610a00565b60405161039c9190613e90565b3480156103d357600080fd5b506103e76103e2366004613c87565b610a92565b6040516001600160a01b03909116815260200161039c565b34801561040b57600080fd5b5061041f61041a366004613bc2565b610b3d565b005b6103ba61042f366004613b47565b610c81565b34801561044057600080fd5b506103ba6040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b34801561048957600080fd5b5061049d610498366004613a18565b610ea5565b60405190815260200161039c565b3480156104b757600080fd5b5060085461049d565b3480156104cc57600080fd5b50600b5461049d565b3480156104e157600080fd5b5061041f6104f0366004613a6c565b610eda565b34801561050157600080fd5b5061049d60195481565b34801561051757600080fd5b5061049d610526366004613a18565b6001600160a01b03166000908152600c602052604090205490565b34801561054d57600080fd5b5061049d61055c366004613bc2565b610f68565b34801561056d57600080fd5b5061041f61057c366004613c41565b611010565b34801561058d57600080fd5b504661049d565b3480156105a057600080fd5b506103906110a0565b3480156105b557600080fd5b5061049d6110c1565b3480156105ca57600080fd5b5061041f6110d3565b3480156105df57600080fd5b5061041f61117b565b3480156105f457600080fd5b5061041f6111fe565b34801561060957600080fd5b5061041f610618366004613a6c565b6112d9565b61041f61062b366004613c87565b6112f4565b34801561063c57600080fd5b5061041f6115b5565b34801561065157600080fd5b5061041f610660366004613c87565b6117d2565b34801561067157600080fd5b5061049d610680366004613c87565b6118a0565b34801561069157600080fd5b5061049d66b1a2bc2ec5000081565b3480156106ac57600080fd5b50600a5474010000000000000000000000000000000000000000900460ff16610390565b3480156106dc57600080fd5b506103e76106eb366004613c87565b611952565b3480156106fc57600080fd5b5061041f61070b366004613c87565b6119dd565b34801561071c57600080fd5b5061049d611a5b565b34801561073157600080fd5b5061041f611a72565b34801561074657600080fd5b5061049d610755366004613a18565b611bc2565b34801561076657600080fd5b5061041f611c5c565b34801561077b57600080fd5b5061049d60145481565b34801561079157600080fd5b5061049d611cdf565b3480156107a657600080fd5b5061049d60165481565b3480156107bc57600080fd5b5061041f6107cb366004613c9f565b611cea565b3480156107dc57600080fd5b5061041f611e60565b3480156107f157600080fd5b50600a546001600160a01b03166103e7565b34801561080f57600080fd5b506103ba611ee1565b34801561082457600080fd5b5061049d61025881565b34801561083a57600080fd5b5061041f610849366004613b16565b611ef0565b34801561085a57600080fd5b5061041f611ff2565b34801561086f57600080fd5b5061041f61087e366004613aac565b6120c9565b34801561088f57600080fd5b5061041f61215e565b3480156108a457600080fd5b506103ba6108b3366004613c87565b612235565b3480156108c457600080fd5b50610390612269565b3480156108d957600080fd5b506103ba61228f565b3480156108ee57600080fd5b5061049d60105481565b34801561090457600080fd5b5061041f61231d565b34801561091957600080fd5b5061049d60175481565b34801561092f57600080fd5b5061049d60185481565b34801561094557600080fd5b5061049d60115481565b34801561095b57600080fd5b5061039061096a366004613a34565b61242b565b34801561097b57600080fd5b5061049d612514565b34801561099057600080fd5b5061041f61099f366004613a18565b61253a565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d630000000000000000000000000000000000000000000000000000000014806109fa57506109fa82612698565b92915050565b606060008054610a0f90613f4f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3b90613f4f565b8015610a885780601f10610a5d57610100808354040283529160200191610a88565b820191906000526020600020905b815481529060010190602001808311610a6b57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610b215760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610b4882611952565b9050806001600160a01b0316836001600160a01b03161415610bd25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610b18565b806001600160a01b0316610be461277b565b6001600160a01b03161480610c005750610c008161096a61277b565b610c725760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b18565b610c7c8383612785565b505050565b60408051606081810183526001600160a01b0388166000818152600c602090815290859020548452830152918101869052610cbf878287878761280b565b610d315760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d61746360448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610b18565b6001600160a01b0387166000908152600c6020526040902054610d55906001612913565b6001600160a01b0388166000908152600c60205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610da590899033908a90613e32565b60405180910390a1600080306001600160a01b0316888a604051602001610dcd929190613d42565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610e0591613d26565b6000604051808303816000865af19150503d8060008114610e42576040519150601f19603f3d011682016040523d82523d6000602084013e610e47565b606091505b509150915081610e995760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c000000006044820152606401610b18565b98975050505050505050565b601354600090610100900460ff16610ebe5760006109fa565b506001600160a01b031660009081526012602052604090205490565b610eeb610ee561277b565b82612926565b610f5d5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b18565b610c7c838383612a06565b6000610f7383611bc2565b8210610fe75760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610b18565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61101861277b565b6001600160a01b0316611033600a546001600160a01b031690565b6001600160a01b0316146110895760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b805161109c90600f9060208401906138cc565b5050565b60135460009060ff1680156110bc5750601354610100900460ff165b905090565b60006011546010546110bc9190613f0c565b6110db61277b565b6001600160a01b03166110f6600a546001600160a01b031690565b6001600160a01b03161461114c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b6040514790339082156108fc029083906000818181858888f1935050505015801561109c573d6000803e3d6000fd5b61118361277b565b6001600160a01b031661119e600a546001600160a01b031690565b6001600160a01b0316146111f45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b6111fc612bf6565b565b61120661277b565b6001600160a01b0316611221600a546001600160a01b031690565b6001600160a01b0316146112775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b60135460ff16156112ca5760405162461bcd60e51b815260206004820152601260248201527f436c61696d696e672069732061637469766500000000000000000000000000006044820152606401610b18565b6013805460ff19166001179055565b610c7c838383604051806020016040528060008152506120c9565b600a5474010000000000000000000000000000000000000000900460ff161561135f5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b18565b60155460ff166113b15760405162461bcd60e51b815260206004820152601560248201527f41756374696f6e206973206e6f742061637469766500000000000000000000006044820152606401610b18565b6113b96110c1565b6113c1611a5b565b1061140e5760405162461bcd60e51b815260206004820152601160248201527f41756374696f6e20636f6d706c657465640000000000000000000000000000006044820152606401610b18565b6019548111156114605760405162461bcd60e51b815260206004820152601260248201527f426964206c696d697420657863656564656400000000000000000000000000006044820152606401610b18565b600061147b61146d611a5b565b6114756110c1565b90612cce565b905060006114898383612cda565b9050818111156114a957634e487b7160e01b600052600160045260246000fd5b60006114bd826114b7612514565b90612cf0565b90503481111561150f5760405162461bcd60e51b815260206004820152600e60248201527f4e6f7420656e6f756768204554480000000000000000000000000000000000006044820152606401610b18565b60005b828110156115355761152333612cfc565b8061152d81613f8a565b915050611512565b50604080518381526020810183905233917f50d9faca2f54fab8a9e5552d9baa1b241ac60ff4d122940eb1797eba9fdc4ef6910160405180910390a2600061157d3483612cce565b604051909150339082156108fc029083906000818181858888f193505050501580156115ad573d6000803e3d6000fd5b505050505050565b600a5474010000000000000000000000000000000000000000900460ff16156116205760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b18565b60135460ff166116725760405162461bcd60e51b815260206004820152601660248201527f436c61696d696e67206973206e6f7420616374697665000000000000000000006044820152606401610b18565b601354610100900460ff166116c95760405162461bcd60e51b815260206004820152601560248201527f52657365727665206973206e6f742061637469766500000000000000000000006044820152606401610b18565b336000908152601260205260409020546117255760405162461bcd60e51b815260206004820152601260248201527f4e6f20746f6b656e7320746f20636c61696d00000000000000000000000000006044820152606401610b18565b33600090815260126020526040812054601454909190611746908390612cda565b90506117528282612cce565b3360009081526012602052604090205560115461176f9082612913565b60115560005b818110156117985761178633612cfc565b8061179081613f8a565b915050611775565b5060405181815233907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a25050565b6117da61277b565b6001600160a01b03166117f5600a546001600160a01b031690565b6001600160a01b03161461184b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b6000811161189b5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420616d6f756e740000000000000000000000000000000000006044820152606401610b18565b601955565b60006118ab60085490565b821061191f5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610b18565b6008828154811061194057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806109fa5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610b18565b6119e561277b565b6001600160a01b0316611a00600a546001600160a01b031690565b6001600160a01b031614611a565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b601455565b6000601154611a68611cdf565b6110bc9190613f0c565b611a7a61277b565b6001600160a01b0316611a95600a546001600160a01b031690565b6001600160a01b031614611aeb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b600a5474010000000000000000000000000000000000000000900460ff1615611b565760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b18565b60155460ff1615611ba95760405162461bcd60e51b815260206004820152601160248201527f41756374696f6e206973206163746976650000000000000000000000000000006044820152606401610b18565b426016556015805460ff191660011790556111fc61231d565b60006001600160a01b038216611c405760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610b18565b506001600160a01b031660009081526003602052604090205490565b611c6461277b565b6001600160a01b0316611c7f600a546001600160a01b031690565b6001600160a01b031614611cd55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b6111fc6000612d1c565b60006110bc600d5490565b611cf261277b565b6001600160a01b0316611d0d600a546001600160a01b031690565b6001600160a01b031614611d635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b60155460ff1615611db65760405162461bcd60e51b815260206004820152601160248201527f41756374696f6e206973206163746976650000000000000000000000000000006044820152606401610b18565b808211611e055760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964206d61782070726963650000000000000000000000000000006044820152606401610b18565b60008111611e555760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964206d696e2070726963650000000000000000000000000000006044820152606401610b18565b601791909155601855565b611e6861277b565b6001600160a01b0316611e83600a546001600160a01b031690565b6001600160a01b031614611ed95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b6111fc612d86565b606060018054610a0f90613f4f565b611ef861277b565b6001600160a01b0316826001600160a01b03161415611f595760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b18565b8060056000611f6661277b565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611faa61277b565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611fe6911515815260200190565b60405180910390a35050565b611ffa61277b565b6001600160a01b0316612015600a546001600160a01b031690565b6001600160a01b03161461206b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b60135460ff166120bd5760405162461bcd60e51b815260206004820152601a60248201527f436c61696d696e6720697320616c7265616479207061757365640000000000006044820152606401610b18565b6013805460ff19169055565b6120da6120d461277b565b83612926565b61214c5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b18565b61215884848484612e59565b50505050565b61216661277b565b6001600160a01b0316612181600a546001600160a01b031690565b6001600160a01b0316146121d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b60155460ff166122295760405162461bcd60e51b815260206004820152601560248201527f41756374696f6e206973206e6f742061637469766500000000000000000000006044820152606401610b18565b6015805460ff19169055565b6060600f61224283612ee2565b604051602001612253929190613d8c565b6040516020818303038152906040529050919050565b60155460009060ff1680156110bc57506122816110c1565b612289611a5b565b10905090565b600f805461229c90613f4f565b80601f01602080910402602001604051908101604052809291908181526020018280546122c890613f4f565b80156123155780601f106122ea57610100808354040283529160200191612315565b820191906000526020600020905b8154815290600101906020018083116122f857829003601f168201915b505050505081565b61232561277b565b6001600160a01b0316612340600a546001600160a01b031690565b6001600160a01b0316146123965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b600a5474010000000000000000000000000000000000000000900460ff16156124015760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b18565b601380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000169055565b600e546040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260009281169190841690829063c45527919060240160206040518083038186803b15801561249157600080fd5b505afa1580156124a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124c99190613c25565b6001600160a01b031614156124e25760019150506109fa565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b60155460009060ff16612528575060175490565b6110bc60165442601754601854613030565b61254261277b565b6001600160a01b031661255d600a546001600160a01b031690565b6001600160a01b0316146125b35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b6001600160a01b03811661262f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b18565b61263881612d1c565b50565b60003330141561269257600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506126959050565b50335b90565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061272b57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806109fa57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146109fa565b60006110bc61263b565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915581906127d282611952565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166128895760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201527f49474e45520000000000000000000000000000000000000000000000000000006064820152608401610b18565b600161289c612897876130de565b61315b565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa1580156128ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600061291f8284613ea3565b9392505050565b6000818152600260205260408120546001600160a01b03166129b05760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610b18565b60006129bb83611952565b9050806001600160a01b0316846001600160a01b031614806129f65750836001600160a01b03166129eb84610a92565b6001600160a01b0316145b8061250c575061250c818561242b565b826001600160a01b0316612a1982611952565b6001600160a01b031614612a955760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610b18565b6001600160a01b038216612b105760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b18565b612b1b8383836131a6565b612b26600082612785565b6001600160a01b0383166000908152600360205260408120805460019290612b4f908490613f0c565b90915550506001600160a01b0382166000908152600360205260408120805460019290612b7d908490613ea3565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a5474010000000000000000000000000000000000000000900460ff16612c605760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610b18565b600a80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612cb161277b565b6040516001600160a01b03909116815260200160405180910390a1565b600061291f8284613f0c565b6000818310612ce9578161291f565b5090919050565b600061291f8284613ecf565b612d0a600d80546001019055565b61263881612d17600d5490565b61321c565b600a80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a5474010000000000000000000000000000000000000000900460ff1615612df15760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b18565b600a80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612cb161277b565b612e64848484612a06565b612e7084848484613236565b6121585760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b18565b606081612f2257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612f4c5780612f3681613f8a565b9150612f459050600a83613ebb565b9150612f26565b60008167ffffffffffffffff811115612f7557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612f9f576020820181803683370190505b5090505b841561250c57612fb4600183613f0c565b9150612fc1600a86613fc3565b612fcc906030613ea3565b60f81b818381518110612fef57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613029600a86613ebb565b9450612fa3565b60008183116130815760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964206d61782070726963650000000000000000000000000000006044820152606401610b18565b8484101561309057508161250c565b60006130b366b1a2bc2ec500006114b76102586130ad898b612cce565b906133ec565b90506130bf8185612cda565b90506130d4836130cf8684612cce565b6133f8565b9695505050505050565b600060405180608001604052806043815260200161405d604391398051602091820120835184830151604080870151805190860120905161313e950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b6000613166600b5490565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101919091526042810183905260620161313e565b600a5474010000000000000000000000000000000000000000900460ff16156132115760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b18565b610c7c838383613408565b61109c8282604051806020016040528060008152506134c0565b60006001600160a01b0384163b156133e457836001600160a01b031663150b7a0261325f61277b565b8786866040518563ffffffff1660e01b81526004016132819493929190613e5e565b602060405180830381600087803b15801561329b57600080fd5b505af19250505080156132e9575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526132e691810190613c09565b60015b613399573d808015613317576040519150601f19603f3d011682016040523d82523d6000602084013e61331c565b606091505b5080516133915760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b18565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061250c565b50600161250c565b600061291f8284613ebb565b600081831015612ce9578161291f565b6001600160a01b0383166134635761345e81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613486565b816001600160a01b0316836001600160a01b031614613486576134868382613549565b6001600160a01b03821661349d57610c7c816135e6565b826001600160a01b0316826001600160a01b031614610c7c57610c7c82826136bf565b6134ca8383613703565b6134d76000848484613236565b610c7c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b18565b6000600161355684611bc2565b6135609190613f0c565b6000838152600760205260409020549091508082146135b3576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906135f890600190613f0c565b6000838152600960205260408120546008805493945090928490811061362e57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061365d57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806136a357634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006136ca83611bc2565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60008111801561371557506010548111155b6137615760405162461bcd60e51b815260206004820152601060248201527f496e76616c696420746f6b656e206964000000000000000000000000000000006044820152606401610b18565b61109c82826001600160a01b0382166137bc5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b18565b6000818152600260205260409020546001600160a01b0316156138215760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b18565b61382d600083836131a6565b6001600160a01b0382166000908152600360205260408120805460019290613856908490613ea3565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546138d890613f4f565b90600052602060002090601f0160209004810192826138fa5760008555613940565b82601f1061391357805160ff1916838001178555613940565b82800160010185558215613940579182015b82811115613940578251825591602001919060010190613925565b5061394c929150613950565b5090565b5b8082111561394c5760008155600101613951565b600067ffffffffffffffff8084111561398057613980614003565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156139c6576139c6614003565b816040528093508581528686860111156139df57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112613a09578081fd5b61291f83833560208501613965565b600060208284031215613a29578081fd5b813561291f81614019565b60008060408385031215613a46578081fd5b8235613a5181614019565b91506020830135613a6181614019565b809150509250929050565b600080600060608486031215613a80578081fd5b8335613a8b81614019565b92506020840135613a9b81614019565b929592945050506040919091013590565b60008060008060808587031215613ac1578081fd5b8435613acc81614019565b93506020850135613adc81614019565b925060408501359150606085013567ffffffffffffffff811115613afe578182fd5b613b0a878288016139f9565b91505092959194509250565b60008060408385031215613b28578182fd5b8235613b3381614019565b915060208301358015158114613a61578182fd5b600080600080600060a08688031215613b5e578081fd5b8535613b6981614019565b9450602086013567ffffffffffffffff811115613b84578182fd5b613b90888289016139f9565b9450506040860135925060608601359150608086013560ff81168114613bb4578182fd5b809150509295509295909350565b60008060408385031215613bd4578182fd5b8235613bdf81614019565b946020939093013593505050565b600060208284031215613bfe578081fd5b813561291f8161402e565b600060208284031215613c1a578081fd5b815161291f8161402e565b600060208284031215613c36578081fd5b815161291f81614019565b600060208284031215613c52578081fd5b813567ffffffffffffffff811115613c68578182fd5b8201601f81018413613c78578182fd5b61250c84823560208401613965565b600060208284031215613c98578081fd5b5035919050565b60008060408385031215613cb1578182fd5b50508035926020909101359150565b60008151808452613cd8816020860160208601613f23565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008151613d1c818560208601613f23565b9290920192915050565b60008251613d38818460208701613f23565b9190910192915050565b60008351613d54818460208801613f23565b60609390931b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169190920190815260140192915050565b600080845482600182811c915080831680613da857607f831692505b6020808410821415613dc857634e487b7160e01b87526022600452602487fd5b818015613ddc5760018114613ded57613e19565b60ff19861689528489019650613e19565b60008b815260209020885b86811015613e115781548b820152908501908301613df8565b505084890196505b505050505050613e298185613d0a565b95945050505050565b60006001600160a01b03808616835280851660208401525060606040830152613e296060830184613cc0565b60006001600160a01b038087168352808616602084015250836040830152608060608301526130d46080830184613cc0565b60208152600061291f6020830184613cc0565b60008219821115613eb657613eb6613fd7565b500190565b600082613eca57613eca613fed565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613f0757613f07613fd7565b500290565b600082821015613f1e57613f1e613fd7565b500390565b60005b83811015613f3e578181015183820152602001613f26565b838111156121585750506000910152565b600181811c90821680613f6357607f821691505b60208210811415613f8457634e487b7160e01b600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613fbc57613fbc613fd7565b5060010190565b600082613fd257613fd2613fed565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461263857600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461263857600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a26469706673582212207834e4e645b4210d4785bcf9d11b35d8da4e4ce5adb1061bb6ae18e5a596a24164736f6c63430008040033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c742968747470733a2f2f7777772e63687562626976657273652e636f6d2f6170692f6d6574612f312f000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000000000000000000000000000000000000000000114368756262697665727365204672656e7300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034348460000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061036b5760003560e01c80636757ac1d116101c6578063aad2816e116100f7578063de4cf6f611610095578063e834a8341161006f578063e834a83414610939578063e985e9c51461094f578063eb91d37e1461096f578063f2fde38b1461098457600080fd5b8063de4cf6f6146108f8578063e38d6b5c1461090d578063e45be8eb1461092357600080fd5b8063c87b56dd116100d1578063c87b56dd14610898578063d1b4b9a3146108b8578063d547cfb7146108cd578063d5abeb01146108e257600080fd5b8063aad2816e1461084e578063b88d4fde14610863578063b9ae73641461088357600080fd5b806378e97925116101645780638da5cb5b1161013e5780638da5cb5b146107e557806395d89b411461080357806395e8bb2314610818578063a22cb4651461082e57600080fd5b806378e979251461079a5780637fdd5e8e146107b05780638456cb59146107d057600080fd5b806370a08231116101a057806370a082311461073a578063715018a61461075a57806371a64f161461076f578063771282f61461078557600080fd5b80636757ac1d146106f0578063678212d9146107105780636b64c7691461072557600080fd5b80633408e470116102a0578063454a2ab31161023e5780634f6ccce7116102185780634f6ccce7146106655780635bfa896a146106855780635c975abb146106a05780636352211e146106d057600080fd5b8063454a2ab31461061d5780634e71d92d146106305780634f0996ba1461064557600080fd5b80633ccfd60b1161027a5780633ccfd60b146105be5780633f4ba83a146105d35780633ff8035b146105e857806342842e0e146105fd57600080fd5b80633408e470146105815780633732ad1c14610594578063384d2084146105a957600080fd5b806318160ddd1161030d5780632781602b116102e75780632781602b146104f55780632d0335ab1461050b5780632f745c591461054157806330176e131461056157600080fd5b806318160ddd146104ab57806320379ee5146104c057806323b872dd146104d557600080fd5b8063095ea7b311610349578063095ea7b3146103ff5780630c53c51c146104215780630f7e597014610434578063132a98c01461047d57600080fd5b806301ffc9a71461037057806306fdde03146103a5578063081812fc146103c7575b600080fd5b34801561037c57600080fd5b5061039061038b366004613bed565b6109a4565b60405190151581526020015b60405180910390f35b3480156103b157600080fd5b506103ba610a00565b60405161039c9190613e90565b3480156103d357600080fd5b506103e76103e2366004613c87565b610a92565b6040516001600160a01b03909116815260200161039c565b34801561040b57600080fd5b5061041f61041a366004613bc2565b610b3d565b005b6103ba61042f366004613b47565b610c81565b34801561044057600080fd5b506103ba6040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b34801561048957600080fd5b5061049d610498366004613a18565b610ea5565b60405190815260200161039c565b3480156104b757600080fd5b5060085461049d565b3480156104cc57600080fd5b50600b5461049d565b3480156104e157600080fd5b5061041f6104f0366004613a6c565b610eda565b34801561050157600080fd5b5061049d60195481565b34801561051757600080fd5b5061049d610526366004613a18565b6001600160a01b03166000908152600c602052604090205490565b34801561054d57600080fd5b5061049d61055c366004613bc2565b610f68565b34801561056d57600080fd5b5061041f61057c366004613c41565b611010565b34801561058d57600080fd5b504661049d565b3480156105a057600080fd5b506103906110a0565b3480156105b557600080fd5b5061049d6110c1565b3480156105ca57600080fd5b5061041f6110d3565b3480156105df57600080fd5b5061041f61117b565b3480156105f457600080fd5b5061041f6111fe565b34801561060957600080fd5b5061041f610618366004613a6c565b6112d9565b61041f61062b366004613c87565b6112f4565b34801561063c57600080fd5b5061041f6115b5565b34801561065157600080fd5b5061041f610660366004613c87565b6117d2565b34801561067157600080fd5b5061049d610680366004613c87565b6118a0565b34801561069157600080fd5b5061049d66b1a2bc2ec5000081565b3480156106ac57600080fd5b50600a5474010000000000000000000000000000000000000000900460ff16610390565b3480156106dc57600080fd5b506103e76106eb366004613c87565b611952565b3480156106fc57600080fd5b5061041f61070b366004613c87565b6119dd565b34801561071c57600080fd5b5061049d611a5b565b34801561073157600080fd5b5061041f611a72565b34801561074657600080fd5b5061049d610755366004613a18565b611bc2565b34801561076657600080fd5b5061041f611c5c565b34801561077b57600080fd5b5061049d60145481565b34801561079157600080fd5b5061049d611cdf565b3480156107a657600080fd5b5061049d60165481565b3480156107bc57600080fd5b5061041f6107cb366004613c9f565b611cea565b3480156107dc57600080fd5b5061041f611e60565b3480156107f157600080fd5b50600a546001600160a01b03166103e7565b34801561080f57600080fd5b506103ba611ee1565b34801561082457600080fd5b5061049d61025881565b34801561083a57600080fd5b5061041f610849366004613b16565b611ef0565b34801561085a57600080fd5b5061041f611ff2565b34801561086f57600080fd5b5061041f61087e366004613aac565b6120c9565b34801561088f57600080fd5b5061041f61215e565b3480156108a457600080fd5b506103ba6108b3366004613c87565b612235565b3480156108c457600080fd5b50610390612269565b3480156108d957600080fd5b506103ba61228f565b3480156108ee57600080fd5b5061049d60105481565b34801561090457600080fd5b5061041f61231d565b34801561091957600080fd5b5061049d60175481565b34801561092f57600080fd5b5061049d60185481565b34801561094557600080fd5b5061049d60115481565b34801561095b57600080fd5b5061039061096a366004613a34565b61242b565b34801561097b57600080fd5b5061049d612514565b34801561099057600080fd5b5061041f61099f366004613a18565b61253a565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d630000000000000000000000000000000000000000000000000000000014806109fa57506109fa82612698565b92915050565b606060008054610a0f90613f4f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3b90613f4f565b8015610a885780601f10610a5d57610100808354040283529160200191610a88565b820191906000526020600020905b815481529060010190602001808311610a6b57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610b215760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610b4882611952565b9050806001600160a01b0316836001600160a01b03161415610bd25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610b18565b806001600160a01b0316610be461277b565b6001600160a01b03161480610c005750610c008161096a61277b565b610c725760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b18565b610c7c8383612785565b505050565b60408051606081810183526001600160a01b0388166000818152600c602090815290859020548452830152918101869052610cbf878287878761280b565b610d315760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d61746360448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610b18565b6001600160a01b0387166000908152600c6020526040902054610d55906001612913565b6001600160a01b0388166000908152600c60205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610da590899033908a90613e32565b60405180910390a1600080306001600160a01b0316888a604051602001610dcd929190613d42565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610e0591613d26565b6000604051808303816000865af19150503d8060008114610e42576040519150601f19603f3d011682016040523d82523d6000602084013e610e47565b606091505b509150915081610e995760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c000000006044820152606401610b18565b98975050505050505050565b601354600090610100900460ff16610ebe5760006109fa565b506001600160a01b031660009081526012602052604090205490565b610eeb610ee561277b565b82612926565b610f5d5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b18565b610c7c838383612a06565b6000610f7383611bc2565b8210610fe75760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610b18565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61101861277b565b6001600160a01b0316611033600a546001600160a01b031690565b6001600160a01b0316146110895760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b805161109c90600f9060208401906138cc565b5050565b60135460009060ff1680156110bc5750601354610100900460ff165b905090565b60006011546010546110bc9190613f0c565b6110db61277b565b6001600160a01b03166110f6600a546001600160a01b031690565b6001600160a01b03161461114c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b6040514790339082156108fc029083906000818181858888f1935050505015801561109c573d6000803e3d6000fd5b61118361277b565b6001600160a01b031661119e600a546001600160a01b031690565b6001600160a01b0316146111f45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b6111fc612bf6565b565b61120661277b565b6001600160a01b0316611221600a546001600160a01b031690565b6001600160a01b0316146112775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b60135460ff16156112ca5760405162461bcd60e51b815260206004820152601260248201527f436c61696d696e672069732061637469766500000000000000000000000000006044820152606401610b18565b6013805460ff19166001179055565b610c7c838383604051806020016040528060008152506120c9565b600a5474010000000000000000000000000000000000000000900460ff161561135f5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b18565b60155460ff166113b15760405162461bcd60e51b815260206004820152601560248201527f41756374696f6e206973206e6f742061637469766500000000000000000000006044820152606401610b18565b6113b96110c1565b6113c1611a5b565b1061140e5760405162461bcd60e51b815260206004820152601160248201527f41756374696f6e20636f6d706c657465640000000000000000000000000000006044820152606401610b18565b6019548111156114605760405162461bcd60e51b815260206004820152601260248201527f426964206c696d697420657863656564656400000000000000000000000000006044820152606401610b18565b600061147b61146d611a5b565b6114756110c1565b90612cce565b905060006114898383612cda565b9050818111156114a957634e487b7160e01b600052600160045260246000fd5b60006114bd826114b7612514565b90612cf0565b90503481111561150f5760405162461bcd60e51b815260206004820152600e60248201527f4e6f7420656e6f756768204554480000000000000000000000000000000000006044820152606401610b18565b60005b828110156115355761152333612cfc565b8061152d81613f8a565b915050611512565b50604080518381526020810183905233917f50d9faca2f54fab8a9e5552d9baa1b241ac60ff4d122940eb1797eba9fdc4ef6910160405180910390a2600061157d3483612cce565b604051909150339082156108fc029083906000818181858888f193505050501580156115ad573d6000803e3d6000fd5b505050505050565b600a5474010000000000000000000000000000000000000000900460ff16156116205760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b18565b60135460ff166116725760405162461bcd60e51b815260206004820152601660248201527f436c61696d696e67206973206e6f7420616374697665000000000000000000006044820152606401610b18565b601354610100900460ff166116c95760405162461bcd60e51b815260206004820152601560248201527f52657365727665206973206e6f742061637469766500000000000000000000006044820152606401610b18565b336000908152601260205260409020546117255760405162461bcd60e51b815260206004820152601260248201527f4e6f20746f6b656e7320746f20636c61696d00000000000000000000000000006044820152606401610b18565b33600090815260126020526040812054601454909190611746908390612cda565b90506117528282612cce565b3360009081526012602052604090205560115461176f9082612913565b60115560005b818110156117985761178633612cfc565b8061179081613f8a565b915050611775565b5060405181815233907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a25050565b6117da61277b565b6001600160a01b03166117f5600a546001600160a01b031690565b6001600160a01b03161461184b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b6000811161189b5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420616d6f756e740000000000000000000000000000000000006044820152606401610b18565b601955565b60006118ab60085490565b821061191f5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610b18565b6008828154811061194057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806109fa5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610b18565b6119e561277b565b6001600160a01b0316611a00600a546001600160a01b031690565b6001600160a01b031614611a565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b601455565b6000601154611a68611cdf565b6110bc9190613f0c565b611a7a61277b565b6001600160a01b0316611a95600a546001600160a01b031690565b6001600160a01b031614611aeb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b600a5474010000000000000000000000000000000000000000900460ff1615611b565760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b18565b60155460ff1615611ba95760405162461bcd60e51b815260206004820152601160248201527f41756374696f6e206973206163746976650000000000000000000000000000006044820152606401610b18565b426016556015805460ff191660011790556111fc61231d565b60006001600160a01b038216611c405760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610b18565b506001600160a01b031660009081526003602052604090205490565b611c6461277b565b6001600160a01b0316611c7f600a546001600160a01b031690565b6001600160a01b031614611cd55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b6111fc6000612d1c565b60006110bc600d5490565b611cf261277b565b6001600160a01b0316611d0d600a546001600160a01b031690565b6001600160a01b031614611d635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b60155460ff1615611db65760405162461bcd60e51b815260206004820152601160248201527f41756374696f6e206973206163746976650000000000000000000000000000006044820152606401610b18565b808211611e055760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964206d61782070726963650000000000000000000000000000006044820152606401610b18565b60008111611e555760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964206d696e2070726963650000000000000000000000000000006044820152606401610b18565b601791909155601855565b611e6861277b565b6001600160a01b0316611e83600a546001600160a01b031690565b6001600160a01b031614611ed95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b6111fc612d86565b606060018054610a0f90613f4f565b611ef861277b565b6001600160a01b0316826001600160a01b03161415611f595760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b18565b8060056000611f6661277b565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611faa61277b565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611fe6911515815260200190565b60405180910390a35050565b611ffa61277b565b6001600160a01b0316612015600a546001600160a01b031690565b6001600160a01b03161461206b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b60135460ff166120bd5760405162461bcd60e51b815260206004820152601a60248201527f436c61696d696e6720697320616c7265616479207061757365640000000000006044820152606401610b18565b6013805460ff19169055565b6120da6120d461277b565b83612926565b61214c5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b18565b61215884848484612e59565b50505050565b61216661277b565b6001600160a01b0316612181600a546001600160a01b031690565b6001600160a01b0316146121d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b60155460ff166122295760405162461bcd60e51b815260206004820152601560248201527f41756374696f6e206973206e6f742061637469766500000000000000000000006044820152606401610b18565b6015805460ff19169055565b6060600f61224283612ee2565b604051602001612253929190613d8c565b6040516020818303038152906040529050919050565b60155460009060ff1680156110bc57506122816110c1565b612289611a5b565b10905090565b600f805461229c90613f4f565b80601f01602080910402602001604051908101604052809291908181526020018280546122c890613f4f565b80156123155780601f106122ea57610100808354040283529160200191612315565b820191906000526020600020905b8154815290600101906020018083116122f857829003601f168201915b505050505081565b61232561277b565b6001600160a01b0316612340600a546001600160a01b031690565b6001600160a01b0316146123965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b600a5474010000000000000000000000000000000000000000900460ff16156124015760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b18565b601380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000169055565b600e546040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260009281169190841690829063c45527919060240160206040518083038186803b15801561249157600080fd5b505afa1580156124a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124c99190613c25565b6001600160a01b031614156124e25760019150506109fa565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b60155460009060ff16612528575060175490565b6110bc60165442601754601854613030565b61254261277b565b6001600160a01b031661255d600a546001600160a01b031690565b6001600160a01b0316146125b35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b18565b6001600160a01b03811661262f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b18565b61263881612d1c565b50565b60003330141561269257600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506126959050565b50335b90565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061272b57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806109fa57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146109fa565b60006110bc61263b565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915581906127d282611952565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166128895760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201527f49474e45520000000000000000000000000000000000000000000000000000006064820152608401610b18565b600161289c612897876130de565b61315b565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa1580156128ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600061291f8284613ea3565b9392505050565b6000818152600260205260408120546001600160a01b03166129b05760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610b18565b60006129bb83611952565b9050806001600160a01b0316846001600160a01b031614806129f65750836001600160a01b03166129eb84610a92565b6001600160a01b0316145b8061250c575061250c818561242b565b826001600160a01b0316612a1982611952565b6001600160a01b031614612a955760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610b18565b6001600160a01b038216612b105760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b18565b612b1b8383836131a6565b612b26600082612785565b6001600160a01b0383166000908152600360205260408120805460019290612b4f908490613f0c565b90915550506001600160a01b0382166000908152600360205260408120805460019290612b7d908490613ea3565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a5474010000000000000000000000000000000000000000900460ff16612c605760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610b18565b600a80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612cb161277b565b6040516001600160a01b03909116815260200160405180910390a1565b600061291f8284613f0c565b6000818310612ce9578161291f565b5090919050565b600061291f8284613ecf565b612d0a600d80546001019055565b61263881612d17600d5490565b61321c565b600a80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a5474010000000000000000000000000000000000000000900460ff1615612df15760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b18565b600a80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612cb161277b565b612e64848484612a06565b612e7084848484613236565b6121585760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b18565b606081612f2257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612f4c5780612f3681613f8a565b9150612f459050600a83613ebb565b9150612f26565b60008167ffffffffffffffff811115612f7557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612f9f576020820181803683370190505b5090505b841561250c57612fb4600183613f0c565b9150612fc1600a86613fc3565b612fcc906030613ea3565b60f81b818381518110612fef57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613029600a86613ebb565b9450612fa3565b60008183116130815760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964206d61782070726963650000000000000000000000000000006044820152606401610b18565b8484101561309057508161250c565b60006130b366b1a2bc2ec500006114b76102586130ad898b612cce565b906133ec565b90506130bf8185612cda565b90506130d4836130cf8684612cce565b6133f8565b9695505050505050565b600060405180608001604052806043815260200161405d604391398051602091820120835184830151604080870151805190860120905161313e950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b6000613166600b5490565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101919091526042810183905260620161313e565b600a5474010000000000000000000000000000000000000000900460ff16156132115760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b18565b610c7c838383613408565b61109c8282604051806020016040528060008152506134c0565b60006001600160a01b0384163b156133e457836001600160a01b031663150b7a0261325f61277b565b8786866040518563ffffffff1660e01b81526004016132819493929190613e5e565b602060405180830381600087803b15801561329b57600080fd5b505af19250505080156132e9575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526132e691810190613c09565b60015b613399573d808015613317576040519150601f19603f3d011682016040523d82523d6000602084013e61331c565b606091505b5080516133915760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b18565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061250c565b50600161250c565b600061291f8284613ebb565b600081831015612ce9578161291f565b6001600160a01b0383166134635761345e81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613486565b816001600160a01b0316836001600160a01b031614613486576134868382613549565b6001600160a01b03821661349d57610c7c816135e6565b826001600160a01b0316826001600160a01b031614610c7c57610c7c82826136bf565b6134ca8383613703565b6134d76000848484613236565b610c7c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b18565b6000600161355684611bc2565b6135609190613f0c565b6000838152600760205260409020549091508082146135b3576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906135f890600190613f0c565b6000838152600960205260408120546008805493945090928490811061362e57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061365d57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806136a357634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006136ca83611bc2565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60008111801561371557506010548111155b6137615760405162461bcd60e51b815260206004820152601060248201527f496e76616c696420746f6b656e206964000000000000000000000000000000006044820152606401610b18565b61109c82826001600160a01b0382166137bc5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b18565b6000818152600260205260409020546001600160a01b0316156138215760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b18565b61382d600083836131a6565b6001600160a01b0382166000908152600360205260408120805460019290613856908490613ea3565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546138d890613f4f565b90600052602060002090601f0160209004810192826138fa5760008555613940565b82601f1061391357805160ff1916838001178555613940565b82800160010185558215613940579182015b82811115613940578251825591602001919060010190613925565b5061394c929150613950565b5090565b5b8082111561394c5760008155600101613951565b600067ffffffffffffffff8084111561398057613980614003565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156139c6576139c6614003565b816040528093508581528686860111156139df57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112613a09578081fd5b61291f83833560208501613965565b600060208284031215613a29578081fd5b813561291f81614019565b60008060408385031215613a46578081fd5b8235613a5181614019565b91506020830135613a6181614019565b809150509250929050565b600080600060608486031215613a80578081fd5b8335613a8b81614019565b92506020840135613a9b81614019565b929592945050506040919091013590565b60008060008060808587031215613ac1578081fd5b8435613acc81614019565b93506020850135613adc81614019565b925060408501359150606085013567ffffffffffffffff811115613afe578182fd5b613b0a878288016139f9565b91505092959194509250565b60008060408385031215613b28578182fd5b8235613b3381614019565b915060208301358015158114613a61578182fd5b600080600080600060a08688031215613b5e578081fd5b8535613b6981614019565b9450602086013567ffffffffffffffff811115613b84578182fd5b613b90888289016139f9565b9450506040860135925060608601359150608086013560ff81168114613bb4578182fd5b809150509295509295909350565b60008060408385031215613bd4578182fd5b8235613bdf81614019565b946020939093013593505050565b600060208284031215613bfe578081fd5b813561291f8161402e565b600060208284031215613c1a578081fd5b815161291f8161402e565b600060208284031215613c36578081fd5b815161291f81614019565b600060208284031215613c52578081fd5b813567ffffffffffffffff811115613c68578182fd5b8201601f81018413613c78578182fd5b61250c84823560208401613965565b600060208284031215613c98578081fd5b5035919050565b60008060408385031215613cb1578182fd5b50508035926020909101359150565b60008151808452613cd8816020860160208601613f23565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008151613d1c818560208601613f23565b9290920192915050565b60008251613d38818460208701613f23565b9190910192915050565b60008351613d54818460208801613f23565b60609390931b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169190920190815260140192915050565b600080845482600182811c915080831680613da857607f831692505b6020808410821415613dc857634e487b7160e01b87526022600452602487fd5b818015613ddc5760018114613ded57613e19565b60ff19861689528489019650613e19565b60008b815260209020885b86811015613e115781548b820152908501908301613df8565b505084890196505b505050505050613e298185613d0a565b95945050505050565b60006001600160a01b03808616835280851660208401525060606040830152613e296060830184613cc0565b60006001600160a01b038087168352808616602084015250836040830152608060608301526130d46080830184613cc0565b60208152600061291f6020830184613cc0565b60008219821115613eb657613eb6613fd7565b500190565b600082613eca57613eca613fed565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613f0757613f07613fd7565b500290565b600082821015613f1e57613f1e613fd7565b500390565b60005b83811015613f3e578181015183820152602001613f26565b838111156121585750506000910152565b600181811c90821680613f6357607f821691505b60208210811415613f8457634e487b7160e01b600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613fbc57613fbc613fd7565b5060010190565b600082613fd257613fd2613fed565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461263857600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461263857600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a26469706673582212207834e4e645b4210d4785bcf9d11b35d8da4e4ce5adb1061bb6ae18e5a596a24164736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000000000000000000000000000000000000000000114368756262697665727365204672656e7300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034348460000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Chubbiverse Frens
Arg [1] : _symbol (string): CHF
Arg [2] : _proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000011
Arg [4] : 4368756262697665727365204672656e73000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [6] : 4348460000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.