Address Contract Partially Verified
Address
0x7eCb204feD7e386386CAb46a1fcB823ec5067aD5
Balance
0 ETH
Nonce
1
Code Size
11860 bytes
Creator
0x9E7042Da...C731 at tx 0xa3354613...80767b
Indexed Transactions
0
Contract Bytecode
11860 bytes
0x6080604052600436106102885760003560e01c80636c0360eb1161015a578063b3b2cb7a116100c1578063e4a5665f1161007a578063e4a5665f146106f6578063e8a3d48514610716578063e985e9c51461072b578063f2fde38b1461074b578063f4dc3bd51461076b578063f81227d41461077e57610288565b8063b3b2cb7a14610641578063b88d4fde14610656578063bd32fb6614610676578063c81cd3be14610696578063c87b56dd146106b6578063e268e4d3146106d657610288565b806395d89b411161011357806395d89b41146105bc578063a0712d68146105d1578063a22cb465146105e4578063a6d612f914610604578063aa98e0c614610617578063af2d4f141461062c57610288565b80636c0360eb1461052857806370a082311461053d578063715018a61461055d578063825a229e146105725780638da5cb5b14610592578063924434b8146105a757610288565b80632aea3d23116101fe57806353a8ca95116101b757806353a8ca951461049457806355f804b3146104a95780635e60a711146104c957806360d938dc146104de5780636352211e146104f3578063664f3b401461051357610288565b80632aea3d231461040057806332cb6b0c146104155780633ccfd60b1461042a57806342842e0e1461043f57806344a0d68a1461045f578063453c23101461047f57610288565b8063162094c411610250578063162094c41461035657806318160ddd14610376578063187e33241461038b57806321ca4236146103a057806323b872dd146103c05780632a96c802146103e057610288565b806301ffc9a71461028d57806306fdde03146102c3578063081812fc146102e5578063095ea7b31461031257806313faede614610334575b600080fd5b34801561029957600080fd5b506102ad6102a83660046122e8565b610793565b6040516102ba919061251b565b60405180910390f35b3480156102cf57600080fd5b506102d86107db565b6040516102ba919061252f565b3480156102f157600080fd5b506103056103003660046122d0565b61086d565b6040516102ba91906124ca565b34801561031e57600080fd5b5061033261032d366004612232565b6108b9565b005b34801561034057600080fd5b50610349610951565b6040516102ba9190612526565b34801561036257600080fd5b50610332610371366004612353565b610957565b34801561038257600080fd5b5061034961098d565b34801561039757600080fd5b5061034961099e565b3480156103ac57600080fd5b506103326103bb366004612232565b6109a4565b3480156103cc57600080fd5b506103326103db366004612144565b610a73565b3480156103ec57600080fd5b506103326103fb3660046122d0565b610aab565b34801561040c57600080fd5b50610332610aef565b34801561042157600080fd5b50610349610b4d565b34801561043657600080fd5b50610332610b53565b34801561044b57600080fd5b5061033261045a366004612144565b610bc5565b34801561046b57600080fd5b5061033261047a3660046122d0565b610be0565b34801561048b57600080fd5b50610349610c24565b3480156104a057600080fd5b506102ad610c2a565b3480156104b557600080fd5b506103326104c4366004612320565b610c33565b3480156104d557600080fd5b50610349610c85565b3480156104ea57600080fd5b506102ad610c8b565b3480156104ff57600080fd5b5061030561050e3660046122d0565b610c99565b34801561051f57600080fd5b50610332610cce565b34801561053457600080fd5b506102d8610d21565b34801561054957600080fd5b506103496105583660046120f8565b610daf565b34801561056957600080fd5b50610332610df3565b34801561057e57600080fd5b5061033261058d3660046120f8565b610e3e565b34801561059e57600080fd5b50610305610e9f565b3480156105b357600080fd5b50610349610eae565b3480156105c857600080fd5b506102d8610eb4565b6103326105df3660046122d0565b610ec3565b3480156105f057600080fd5b506103326105ff3660046121f8565b61107a565b61033261061236600461225b565b611148565b34801561062357600080fd5b50610349611389565b34801561063857600080fd5b5061034961138f565b34801561064d57600080fd5b506102ad611395565b34801561066257600080fd5b5061033261067136600461217f565b6113a4565b34801561068257600080fd5b506103326106913660046122d0565b6113e3565b3480156106a257600080fd5b506103496106b13660046120f8565b611427565b3480156106c257600080fd5b506102d86106d13660046122d0565b611442565b3480156106e257600080fd5b506103326106f13660046122d0565b611559565b34801561070257600080fd5b506103326107113660046122d0565b61159d565b34801561072257600080fd5b506102d86115e1565b34801561073757600080fd5b506102ad610746366004612112565b6115f0565b34801561075757600080fd5b506103326107663660046120f8565b61161e565b61033261077936600461225b565b61168f565b34801561078a57600080fd5b50610332611881565b60006001600160e01b031982166380ac58cd60e01b14806107c457506001600160e01b03198216635b5e139f60e01b145b806107d357506107d3826118dd565b90505b919050565b6060600080546107ea90612d5c565b80601f016020809104026020016040519081016040528092919081815260200182805461081690612d5c565b80156108635780601f1061083857610100808354040283529160200191610863565b820191906000526020600020905b81548152906001019060200180831161084657829003601f168201915b5050505050905090565b6000610878826118f6565b61089d5760405162461bcd60e51b815260040161089490612ab3565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006108c482610c99565b9050806001600160a01b0316836001600160a01b031614156108f85760405162461bcd60e51b815260040161089490612b7d565b806001600160a01b031661090a611913565b6001600160a01b03161480610926575061092681610746611913565b6109425760405162461bcd60e51b8152600401610894906128b3565b61094c8383611917565b505050565b600a5481565b6012546001600160a01b0316331461096e57600080fd5b6000828152601060209081526040909120825161094c92840190611fb2565b60006109996013611985565b905090565b600d5481565b6109ac611913565b6001600160a01b03166109bd610e9f565b6001600160a01b0316146109e35760405162461bcd60e51b815260040161089490612aff565b60008111610a035760405162461bcd60e51b815260040161089490612665565b61271081610a116013611985565b610a1b9190612cce565b1115610a395760405162461bcd60e51b8152600401610894906126a9565b60005b8181101561094c57610a4e6013611989565b610a6183610a5c6013611985565b611992565b80610a6b81612d97565b915050610a3c565b610a84610a7e611913565b82611a71565b610aa05760405162461bcd60e51b815260040161089490612bbe565b61094c838383611af6565b610ab3611913565b6001600160a01b0316610ac4610e9f565b6001600160a01b031614610aea5760405162461bcd60e51b815260040161089490612aff565b600b55565b610af7611913565b6001600160a01b0316610b08610e9f565b6001600160a01b031614610b2e5760405162461bcd60e51b815260040161089490612aff565b600f805462ff0000198116620100009182900460ff1615909102179055565b61271081565b610b5b611913565b6001600160a01b0316610b6c610e9f565b6001600160a01b031614610b925760405162461bcd60e51b815260040161089490612aff565b6040514790339082156108fc029083906000818181858888f19350505050158015610bc1573d6000803e3d6000fd5b5050565b61094c838383604051806020016040528060008152506113a4565b610be8611913565b6001600160a01b0316610bf9610e9f565b6001600160a01b031614610c1f5760405162461bcd60e51b815260040161089490612aff565b600a55565b600c5481565b600f5460ff1690565b610c3b611913565b6001600160a01b0316610c4c610e9f565b6001600160a01b031614610c725760405162461bcd60e51b815260040161089490612aff565b8051610bc1906009906020840190611fb2565b600b5481565b600f54610100900460ff1690565b6000818152600260205260408120546001600160a01b0316806107d35760405162461bcd60e51b8152600401610894906129ea565b610cd6611913565b6001600160a01b0316610ce7610e9f565b6001600160a01b031614610d0d5760405162461bcd60e51b815260040161089490612aff565b600f805460ff19811660ff90911615179055565b60098054610d2e90612d5c565b80601f0160208091040260200160405190810160405280929190818152602001828054610d5a90612d5c565b8015610da75780601f10610d7c57610100808354040283529160200191610da7565b820191906000526020600020905b815481529060010190602001808311610d8a57829003601f168201915b505050505081565b60006001600160a01b038216610dd75760405162461bcd60e51b81526004016108949061295c565b506001600160a01b031660009081526003602052604090205490565b610dfb611913565b6001600160a01b0316610e0c610e9f565b6001600160a01b031614610e325760405162461bcd60e51b815260040161089490612aff565b610e3c6000611c23565b565b610e46611913565b6001600160a01b0316610e57610e9f565b6001600160a01b031614610e7d5760405162461bcd60e51b815260040161089490612aff565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031690565b6101f481565b6060600180546107ea90612d5c565b600a548134610ed28284612cfa565b14610eef5760405162461bcd60e51b815260040161089490612c54565b60026007541415610f125760405162461bcd60e51b815260040161089490612c8b565b6002600755600f5460ff16158015610f325750600f54610100900460ff16155b8015610f465750600f5462010000900460ff165b610f625760405162461bcd60e51b8152600401610894906127de565b60008311610f825760405162461bcd60e51b8152600401610894906126e0565b600b54831115610fa45760405162461bcd60e51b8152600401610894906129a6565b600c5433600090815260116020526040902054610fc2908590612cce565b1115610fe05760405162461bcd60e51b815260040161089490612856565b61271083610fee6013611985565b610ff89190612cce565b11156110165760405162461bcd60e51b815260040161089490612542565b60005b8381101561104b5761102b6013611989565b61103933610a5c6013611985565b8061104381612d97565b915050611019565b50336000908152601160205260408120805485929061106b908490612cce565b90915550506001600755505050565b611082611913565b6001600160a01b0316826001600160a01b031614156110b35760405162461bcd60e51b81526004016108949061275b565b80600560006110c0611913565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611104611913565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161113c919061251b565b60405180910390a35050565b8282600e546111b183838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604051859250611196915033906020016123f1565b60405160208183030381529060405280519060200120611c75565b6111cd5760405162461bcd60e51b81526004016108949061281f565b600a5484346111dc8284612cfa565b146111f95760405162461bcd60e51b815260040161089490612c54565b6002600754141561121c5760405162461bcd60e51b815260040161089490612c8b565b6002600755600f5460ff1615801561123b5750600f54610100900460ff165b80156112505750600f5462010000900460ff16155b61126c5760405162461bcd60e51b815260040161089490612c0f565b6000861161128c5760405162461bcd60e51b8152600401610894906126e0565b600b548611156112ae5760405162461bcd60e51b8152600401610894906129a6565b600c54336000908152601160205260409020546112cc908890612cce565b11156112ea5760405162461bcd60e51b815260040161089490612856565b610dac866112f86013611985565b6113029190612cce565b11156113205760405162461bcd60e51b815260040161089490612542565b60005b86811015611355576113356013611989565b61134333610a5c6013611985565b8061134d81612d97565b915050611323565b503360009081526011602052604081208054889290611375908490612cce565b909155505060016007555050505050505050565b600e5481565b610dac81565b600f5462010000900460ff1690565b6113b56113af611913565b83611a71565b6113d15760405162461bcd60e51b815260040161089490612bbe565b6113dd84848484611c8b565b50505050565b6113eb611913565b6001600160a01b03166113fc610e9f565b6001600160a01b0316146114225760405162461bcd60e51b815260040161089490612aff565b600e55565b6001600160a01b031660009081526011602052604090205490565b606061144d826118f6565b6114695760405162461bcd60e51b815260040161089490612a68565b6000828152601060205260409020805461148290612d5c565b15905061152757600082815260106020526040902080546114a290612d5c565b80601f01602080910402602001604051908101604052809291908181526020018280546114ce90612d5c565b801561151b5780601f106114f05761010080835404028352916020019161151b565b820191906000526020600020905b8154815290600101906020018083116114fe57829003601f168201915b505050505090506107d6565b600961153283611cbe565b60405160200161154392919061241c565b60405160208183030381529060405290506107d6565b611561611913565b6001600160a01b0316611572610e9f565b6001600160a01b0316146115985760405162461bcd60e51b815260040161089490612aff565b600c55565b6115a5611913565b6001600160a01b03166115b6610e9f565b6001600160a01b0316146115dc5760405162461bcd60e51b815260040161089490612aff565b600d55565b6060600880546107ea90612d5c565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b611626611913565b6001600160a01b0316611637610e9f565b6001600160a01b03161461165d5760405162461bcd60e51b815260040161089490612aff565b6001600160a01b0381166116835760405162461bcd60e51b8152600401610894906125e8565b61168c81611c23565b50565b8282600d546116dd83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604051859250611196915033906020016123f1565b6116f95760405162461bcd60e51b81526004016108949061281f565b600a5484346117088284612cfa565b146117255760405162461bcd60e51b815260040161089490612c54565b600260075414156117485760405162461bcd60e51b815260040161089490612c8b565b6002600755600f5460ff1680156117675750600f54610100900460ff16155b801561177c5750600f5462010000900460ff16155b6117985760405162461bcd60e51b815260040161089490612910565b600086116117b85760405162461bcd60e51b8152600401610894906126e0565b600b548611156117da5760405162461bcd60e51b8152600401610894906129a6565b600c54336000908152601160205260409020546117f8908890612cce565b11156118165760405162461bcd60e51b815260040161089490612856565b6101f4866118246013611985565b61182e9190612cce565b111561184c5760405162461bcd60e51b815260040161089490612542565b60005b86811015611355576118616013611989565b61186f33610a5c6013611985565b8061187981612d97565b91505061184f565b611889611913565b6001600160a01b031661189a610e9f565b6001600160a01b0316146118c05760405162461bcd60e51b815260040161089490612aff565b600f805461ff001981166101009182900460ff1615909102179055565b6001600160e01b031981166301ffc9a760e01b14919050565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061194c82610c99565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b5490565b80546001019055565b6001600160a01b0382166119b85760405162461bcd60e51b815260040161089490612a33565b6119c1816118f6565b156119de5760405162461bcd60e51b81526004016108949061262e565b6119ea6000838361094c565b6001600160a01b0382166000908152600360205260408120805460019290611a13908490612cce565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000611a7c826118f6565b611a985760405162461bcd60e51b815260040161089490612792565b6000611aa383610c99565b9050806001600160a01b0316846001600160a01b03161480611ade5750836001600160a01b0316611ad38461086d565b6001600160a01b0316145b80611aee5750611aee81856115f0565b949350505050565b826001600160a01b0316611b0982610c99565b6001600160a01b031614611b2f5760405162461bcd60e51b815260040161089490612b34565b6001600160a01b038216611b555760405162461bcd60e51b815260040161089490612717565b611b6083838361094c565b611b6b600082611917565b6001600160a01b0383166000908152600360205260408120805460019290611b94908490612d19565b90915550506001600160a01b0382166000908152600360205260408120805460019290611bc2908490612cce565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082611c828584611dd9565b14949350505050565b611c96848484611af6565b611ca284848484611e91565b6113dd5760405162461bcd60e51b815260040161089490612596565b606081611ce357506040805180820190915260018152600360fc1b60208201526107d6565b8160005b8115611d0d5780611cf781612d97565b9150611d069050600a83612ce6565b9150611ce7565b60008167ffffffffffffffff811115611d3657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611d60576020820181803683370190505b5090505b8415611aee57611d75600183612d19565b9150611d82600a86612db2565b611d8d906030612cce565b60f81b818381518110611db057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611dd2600a86612ce6565b9450611d64565b600081815b8451811015611e89576000858281518110611e0957634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311611e4a578281604051602001611e2d92919061240e565b604051602081830303815290604052805190602001209250611e76565b8083604051602001611e5d92919061240e565b6040516020818303038152906040528051906020012092505b5080611e8181612d97565b915050611dde565b509392505050565b6000611ea5846001600160a01b0316611fac565b15611fa157836001600160a01b031663150b7a02611ec1611913565b8786866040518563ffffffff1660e01b8152600401611ee394939291906124de565b602060405180830381600087803b158015611efd57600080fd5b505af1925050508015611f2d575060408051601f3d908101601f19168201909252611f2a91810190612304565b60015b611f87573d808015611f5b576040519150601f19603f3d011682016040523d82523d6000602084013e611f60565b606091505b508051611f7f5760405162461bcd60e51b815260040161089490612596565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611aee565b506001949350505050565b3b151590565b828054611fbe90612d5c565b90600052602060002090601f016020900481019282611fe05760008555612026565b82601f10611ff957805160ff1916838001178555612026565b82800160010185558215612026579182015b8281111561202657825182559160200191906001019061200b565b50612032929150612036565b5090565b5b808211156120325760008155600101612037565b600067ffffffffffffffff8084111561206657612066612df2565b604051601f8501601f19168101602001828111828210171561208a5761208a612df2565b6040528481529150818385018610156120a257600080fd5b8484602083013760006020868301015250509392505050565b80356001600160a01b03811681146107d657600080fd5b600082601f8301126120e2578081fd5b6120f18383356020850161204b565b9392505050565b600060208284031215612109578081fd5b6120f1826120bb565b60008060408385031215612124578081fd5b61212d836120bb565b915061213b602084016120bb565b90509250929050565b600080600060608486031215612158578081fd5b612161846120bb565b925061216f602085016120bb565b9150604084013590509250925092565b60008060008060808587031215612194578081fd5b61219d856120bb565b93506121ab602086016120bb565b925060408501359150606085013567ffffffffffffffff8111156121cd578182fd5b8501601f810187136121dd578182fd5b6121ec8782356020840161204b565b91505092959194509250565b6000806040838503121561220a578182fd5b612213836120bb565b915060208301358015158114612227578182fd5b809150509250929050565b60008060408385031215612244578182fd5b61224d836120bb565b946020939093013593505050565b60008060006040848603121561226f578283fd5b833567ffffffffffffffff80821115612286578485fd5b818601915086601f830112612299578485fd5b8135818111156122a7578586fd5b87602080830285010111156122ba578586fd5b6020928301989097509590910135949350505050565b6000602082840312156122e1578081fd5b5035919050565b6000602082840312156122f9578081fd5b81356120f181612e08565b600060208284031215612315578081fd5b81516120f181612e08565b600060208284031215612331578081fd5b813567ffffffffffffffff811115612347578182fd5b611aee848285016120d2565b60008060408385031215612365578182fd5b82359150602083013567ffffffffffffffff811115612382578182fd5b61238e858286016120d2565b9150509250929050565b600081518084526123b0816020860160208601612d30565b601f01601f19169290920160200192915050565b600081516123d6818560208601612d30565b9290920192915050565b64173539b7b760d91b815260050190565b60609190911b6bffffffffffffffffffffffff1916815260140190565b918252602082015260400190565b825460009081906002810460018083168061243857607f831692505b602080841082141561245857634e487b7160e01b87526022600452602487fd5b81801561246c576001811461247d576124a9565b60ff198616895284890196506124a9565b6124868b612cc2565b885b868110156124a15781548b820152908501908301612488565b505084890196505b5050505050506124c16124bc82866123c4565b6123e0565b95945050505050565b6001600160a01b0391909116815260200190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061251190830184612398565b9695505050505050565b901515815260200190565b90815260200190565b6000602082526120f16020830184612398565b60208082526034908201527f507572636861736520776f756c6420657863656564206d6178206e756d626572604082015273206f662077686974656c69737420746f6b656e7360601b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526024908201527f596f752063616e206f6e6c79206d696e74206d6f7265207468616e203020746f6040820152636b656e7360e01b606082015260800190565b6020808252601f908201527f43616e2774206d696e74206d6f7265207468616e206d617820737570706c7900604082015260600190565b6020808252601b908201527f4d757374206d696e74206174206c65617374203120746f6b656e2e0000000000604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526021908201527f4d61696e2073616c65206d7573742062652061637469766520746f206d696e746040820152601760f91b606082015260800190565b6020808252601e908201527f4164647265737320646f6573206e6f7420657869737420696e206c6973740000604082015260600190565b60208082526039908201527f507572636861736520776f756c6420657863656564206d6178206e756d62657260408201527f206f66206d6574616361726473207065722077616c6c65742e00000000000000606082015260800190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602c908201527f467269656e64732066616d696c79206d7573742062652061637469766520746f60408201526b206d696e7420746f6b656e7360a01b606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526024908201527f4578636565646564206d617820746f6b656e73206d696e74656420617420612060408201526374696d6560e01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602b908201527f4552433732314d657461646174613a20717565727920666f72206e6f6e65786960408201526a39ba32b73a103a37b5b2b760a91b606082015260800190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526025908201527f50726573616c65206d7573742062652061637469766520746f206d696e7420746040820152646f6b656e7360d81b606082015260800190565b60208082526018908201527f496e636f7272656374204554482076616c75652073656e740000000000000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60009081526020902090565b60008219821115612ce157612ce1612dc6565b500190565b600082612cf557612cf5612ddc565b500490565b6000816000190483118215151615612d1457612d14612dc6565b500290565b600082821015612d2b57612d2b612dc6565b500390565b60005b83811015612d4b578181015183820152602001612d33565b838111156113dd5750506000910152565b600281046001821680612d7057607f821691505b60208210811415612d9157634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612dab57612dab612dc6565b5060010190565b600082612dc157612dc1612ddc565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461168c57600080fdfea2646970667358221220d706edbe4ebd37390d888034094bea904c43ff6fc6279c038ed94ceef3dbd75a64736f6c63430008000033
Verified Source Code Partial Match
Compiler: v0.8.0+commit.c7dfd78e
EVM: istanbul
Optimization: Yes (200 runs)
FullSend.sol 1595 lines
// File: @openzeppelin/contracts/utils/Counters.sol
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
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;
}
}
// File: @openzeppelin/contracts/utils/cryptography/MerkleProof.sol
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
} else {
// Hash(current element of the proof + current computed hash)
computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
}
}
return computedHash;
}
}
// File: @openzeppelin/contracts/security/ReentrancyGuard.sol
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
// File: @openzeppelin/contracts/utils/Context.sol
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_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);
}
}
// File: @openzeppelin/contracts/utils/Address.sol
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);
}
}
}
}
// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
// File: @openzeppelin/contracts/utils/introspection/IERC165.sol
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
// File: @openzeppelin/contracts/utils/introspection/ERC165.sol
pragma solidity ^0.8.0;
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
// File: @openzeppelin/contracts/token/ERC721/IERC721.sol
pragma solidity ^0.8.0;
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
pragma solidity ^0.8.0;
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
// File: @openzeppelin/contracts/utils/Strings.sol
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
// File: @openzeppelin/contracts/token/ERC721/ERC721.sol
pragma solidity ^0.8.0;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
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 {}
}
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// File: @openzeppelin/contracts/interfaces/IERC20.sol
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)
pragma solidity ^0.8.0;
// File: contracts/FullSend.sol
/*
________ ____ __ _____ _______ ______ __ __________________ _________ ____ ____
/ ____/ / / / / / / / ___// ____/ | / / __ \ / |/ / ____/_ __/ | / ____/ | / __ \/ __ \
/ /_ / / / / / / / \__ \/ __/ / |/ / / / / / /|_/ / __/ / / / /| |/ / / /| | / /_/ / / / /
/ __/ / /_/ / /___/ /___ ___/ / /___/ /| / /_/ / / / / / /___ / / / ___ / /___/ ___ |/ _, _/ /_/ /
/_/ \____/_____/_____/ /____/_____/_/ |_/_____/ /_/ /_/_____/ /_/ /_/ |_\____/_/ |_/_/ |_/_____/
*/
pragma solidity ^0.8.0;
contract FullSend is ERC721, Ownable, ReentrancyGuard {
string private _collectionURI;
string public baseURI;
uint256 public constant MAX_FRIENDS_SUPPLY = 500;
uint256 public constant MAX_WHITELIST_SUPPLY = 3500;
uint256 public constant MAX_SUPPLY = 10000;
uint256 public cost = 0.75 ether;
uint256 public mintsPerTx = 5;
uint256 public maxPerWallet = 10;
// used to validate whitelists
bytes32 public friendsFamilyMerkleRoot;
bytes32 public whitelistMerkleRoot;
bool private _isFriendsFamilyActive;
bool private _isPresaleActive;
bool private _isMainSaleActive;
mapping(uint256 => string) internal tokenUris;
mapping(address => uint256) internal walletCap;
address editor;
using Counters for Counters.Counter;
Counters.Counter private _tokenSupply;
constructor(string memory _baseURI, string memory collectionURI) ERC721("FULL SEND METACARD", "FSMC") {
baseURI = _baseURI;
_collectionURI = collectionURI;
_isFriendsFamilyActive = false;
_isPresaleActive = false;
_isMainSaleActive = false;
}
modifier onlyEditor() {
require(msg.sender == editor);
_;
}
/**
* @dev validates merkleProof
*/
modifier isValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) {
require(
MerkleProof.verify(
merkleProof,
root,
keccak256(abi.encodePacked(msg.sender))
),
"Address does not exist in list"
);
_;
}
modifier isCorrectPayment(uint256 price, uint256 numberOfTokens) {
require(
price * numberOfTokens == msg.value,
"Incorrect ETH value sent"
);
_;
}
// ============ PUBLIC FUNCTIONS FOR MINTING ============
function mintFriendsFamily(
bytes32[] calldata merkleProof,
uint256 numberOfTokens
)
public
payable
isValidMerkleProof(merkleProof, friendsFamilyMerkleRoot)
isCorrectPayment(cost, numberOfTokens)
nonReentrant
{
require(_isFriendsFamilyActive && !_isPresaleActive && !_isMainSaleActive, "Friends family must be active to mint tokens");
require(numberOfTokens > 0, "Must mint at least 1 token.");
require(numberOfTokens <= mintsPerTx, "Exceeded max tokens minted at a time");
require(walletCap[msg.sender] + numberOfTokens <= maxPerWallet, "Purchase would exceed max number of metacards per wallet.");
require(_tokenSupply.current() + numberOfTokens <= MAX_FRIENDS_SUPPLY, "Purchase would exceed max number of whitelist tokens");
for (uint256 i = 0; i < numberOfTokens; i++) {
_tokenSupply.increment();
_mint(msg.sender, _tokenSupply.current());
}
walletCap[msg.sender] += numberOfTokens;
}
/**
* @dev mints 1 token per whitelisted address, does not charge a fee
* 3000 whitelist mints
* charges a fee
*/
function mintWhitelist(
bytes32[] calldata merkleProof,
uint256 numberOfTokens
)
public
payable
isValidMerkleProof(merkleProof, whitelistMerkleRoot)
isCorrectPayment(cost, numberOfTokens)
nonReentrant
{
require(!_isFriendsFamilyActive && _isPresaleActive && !_isMainSaleActive, "Presale must be active to mint tokens");
require(numberOfTokens > 0, "Must mint at least 1 token.");
require(numberOfTokens <= mintsPerTx, "Exceeded max tokens minted at a time");
require(walletCap[msg.sender] + numberOfTokens <= maxPerWallet, "Purchase would exceed max number of metacards per wallet.");
require(_tokenSupply.current() + numberOfTokens <= MAX_WHITELIST_SUPPLY, "Purchase would exceed max number of whitelist tokens");
for (uint256 i = 0; i < numberOfTokens; i++) {
_tokenSupply.increment();
_mint(msg.sender, _tokenSupply.current());
}
walletCap[msg.sender] += numberOfTokens;
}
/**
* @dev mints specified # of tokens to sender address
* 6500 public mints
*/
function mint(
uint256 numberOfTokens
)
public
payable
isCorrectPayment(cost, numberOfTokens)
nonReentrant
{
require(!_isFriendsFamilyActive && !_isPresaleActive && _isMainSaleActive, "Main sale must be active to mint.");
require(numberOfTokens > 0, "Must mint at least 1 token.");
require(numberOfTokens <= mintsPerTx, "Exceeded max tokens minted at a time");
require(walletCap[msg.sender] + numberOfTokens <= maxPerWallet, "Purchase woul...
// [truncated — 53941 bytes total]
Read Contract
MAX_FRIENDS_SUPPLY 0x924434b8 → uint256
MAX_SUPPLY 0x32cb6b0c → uint256
MAX_WHITELIST_SUPPLY 0xaf2d4f14 → uint256
balanceOf 0x70a08231 → uint256
baseURI 0x6c0360eb → string
contractURI 0xe8a3d485 → string
cost 0x13faede6 → uint256
friendsFamilyMerkleRoot 0x187e3324 → bytes32
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isFriendsFamilyActive 0x53a8ca95 → bool
isMainSaleActive 0xb3b2cb7a → bool
isPresaleActive 0x60d938dc → bool
maxPerWallet 0x453c2310 → uint256
mintsPerTx 0x5e60a711 → uint256
name 0x06fdde03 → string
numMintedForAddress 0xc81cd3be → uint256
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
whitelistMerkleRoot 0xaa98e0c6 → bytes32
Write Contract 23 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
flipFriendsFamilyState 0x664f3b40
No parameters
flipMainSaleState 0x2aea3d23
No parameters
flipPresaleState 0xf81227d4
No parameters
mint 0xa0712d68
uint256 numberOfTokens
mintFriendsFamily 0xf4dc3bd5
bytes32[] merkleProof
uint256 numberOfTokens
mintToAddress 0x21ca4236
address _to
uint256 _mintAmount
mintWhitelist 0xa6d612f9
bytes32[] merkleProof
uint256 numberOfTokens
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x55f804b3
string _baseURI
setCost 0x44a0d68a
uint256 _newCost
setEditor 0x825a229e
address ed
setFriendsFamilyMerkleRoot 0xe4a5665f
bytes32 merkleRoot
setMaxPerWallet 0xe268e4d3
uint256 max
setMintsPerTx 0x2a96c802
uint256 numMints
setTokenURI 0x162094c4
uint256 _tokenId
string _uri
setWhitelistMerkleRoot 0xbd32fb66
bytes32 merkleRoot
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters
Recent Transactions
No transactions found for this address