Address Contract Verified
Address
0x6C5a06AE6b773457480c12F12C2fB22627507A3A
Balance
0.145113 ETH
Nonce
2
Code Size
23816 bytes
Creator
0xbBB2D0DD...2d04 at tx 0xc17f1334...59eae0
Indexed Transactions
0
Contract Bytecode
23816 bytes
0x6080604052600436106102cd5760003560e01c806370a08231116101755780639da3f8fd116100dc578063e430e33411610095578063e985e9c51161006f578063e985e9c514610aed578063f2fde38b14610b2a578063fd955ed914610b53578063fda424cc14610b7c576102ed565b8063e430e33414610a6c578063e7064f3514610a97578063e8a3d48514610ac2576102ed565b80639da3f8fd1461094a578063a22cb46514610975578063a867e43b1461099e578063b88d4fde146109c9578063b9bd2801146109f2578063c87b56dd14610a2f576102ed565b80637b6970401161012e5780637b697040146108495780637cac2602146108865780638825169d146108af5780638da5cb5b146108cb5780639471302e146108f657806395d89b411461091f576102ed565b806370a082311461073957806370d5ae0514610776578063715018a6146107a157806379b6ed36146107b85780637ae2b5c7146107e35780637b47ec1a14610820576102ed565b8063333171bb116102345780634f6ccce7116101ed5780635c975abb116101c75780635c975abb1461067b5780636352211e146106a65780636373a6b1146106e35780636c0360eb1461070e576102ed565b80634f6ccce7146105ec57806352c2dd161461062957806355f804b314610652576102ed565b8063333171bb1461052557806339f1cced1461053c5780633ccfd60b1461056757806342842e0e1461057e578063472967e9146105a757806349df728c146105c3576102ed565b80631f917921116102865780631f9179211461041457806323b872dd1461043d5780632a85db55146104665780632ee658451461048f5780632f745c59146104cc57806330cac52414610509576102ed565b806301ffc9a7146102f257806306fdde031461032f578063081812fc1461035a578063095ea7b31461039757806310969523146103c057806318160ddd146103e9576102ed565b366102ed5734601560008282546102e491906142e8565b92505081905550005b600080fd5b3480156102fe57600080fd5b50610319600480360381019061031491906143aa565b610bb9565b60405161032691906143f2565b60405180910390f35b34801561033b57600080fd5b50610344610d03565b60405161035191906144a6565b60405180910390f35b34801561036657600080fd5b50610381600480360381019061037c91906144f4565b610d95565b60405161038e9190614562565b60405180910390f35b3480156103a357600080fd5b506103be60048036038101906103b991906145a9565b610e1a565b005b3480156103cc57600080fd5b506103e760048036038101906103e2919061471e565b610f33565b005b3480156103f557600080fd5b506103fe610f8a565b60405161040b9190614776565b60405180910390f35b34801561042057600080fd5b5061043b6004803603810190610436919061471e565b610fa1565b005b34801561044957600080fd5b50610464600480360381019061045f9190614791565b610fc3565b005b34801561047257600080fd5b5061048d6004803603810190610488919061471e565b610fd3565b005b34801561049b57600080fd5b506104b660048036038101906104b191906147e4565b610fe7565b6040516104c39190614776565b60405180910390f35b3480156104d857600080fd5b506104f360048036038101906104ee91906145a9565b611072565b6040516105009190614776565b60405180910390f35b610523600480360381019061051e9190614824565b611270565b005b34801561053157600080fd5b5061053a61132e565b005b34801561054857600080fd5b50610551611362565b60405161055e9190614776565b60405180910390f35b34801561057357600080fd5b5061057c611368565b005b34801561058a57600080fd5b506105a560048036038101906105a09190614791565b611512565b005b6105c160048036038101906105bc91906147e4565b611532565b005b3480156105cf57600080fd5b506105ea60048036038101906105e59190614880565b611540565b005b3480156105f857600080fd5b50610613600480360381019061060e91906144f4565b611661565b6040516106209190614776565b60405180910390f35b34801561063557600080fd5b50610650600480360381019061064b919061471e565b61174b565b005b34801561065e57600080fd5b506106796004803603810190610674919061471e565b61176d565b005b34801561068757600080fd5b50610690611781565b60405161069d91906143f2565b60405180910390f35b3480156106b257600080fd5b506106cd60048036038101906106c891906144f4565b611794565b6040516106da9190614562565b60405180910390f35b3480156106ef57600080fd5b506106f86117aa565b60405161070591906144a6565b60405180910390f35b34801561071a57600080fd5b50610723611838565b60405161073091906144a6565b60405180910390f35b34801561074557600080fd5b50610760600480360381019061075b9190614880565b6118ca565b60405161076d9190614776565b60405180910390f35b34801561078257600080fd5b5061078b6119b3565b6040516107989190614562565b60405180910390f35b3480156107ad57600080fd5b506107b66119d7565b005b3480156107c457600080fd5b506107cd6119eb565b6040516107da91906144a6565b60405180910390f35b3480156107ef57600080fd5b5061080a600480360381019061080591906148ad565b611a7d565b6040516108179190614776565b60405180910390f35b34801561082c57600080fd5b50610847600480360381019061084291906144f4565b611a99565b005b34801561085557600080fd5b50610870600480360381019061086b9190614880565b611ae7565b60405161087d9190614776565b60405180910390f35b34801561089257600080fd5b506108ad60048036038101906108a89190614912565b611aff565b005b6108c960048036038101906108c491906144f4565b611b66565b005b3480156108d757600080fd5b506108e0611e21565b6040516108ed9190614562565b60405180910390f35b34801561090257600080fd5b5061091d6004803603810190610918919061471e565b611e4b565b005b34801561092b57600080fd5b50610934611e6d565b60405161094191906144a6565b60405180910390f35b34801561095657600080fd5b5061095f611eff565b60405161096c91906149b6565b60405180910390f35b34801561098157600080fd5b5061099c600480360381019061099791906149fd565b611f12565b005b3480156109aa57600080fd5b506109b3612093565b6040516109c09190614776565b60405180910390f35b3480156109d557600080fd5b506109f060048036038101906109eb9190614ade565b612099565b005b3480156109fe57600080fd5b50610a196004803603810190610a149190614880565b6120f5565b604051610a269190614776565b60405180910390f35b348015610a3b57600080fd5b50610a566004803603810190610a5191906144f4565b61210d565b604051610a6391906144a6565b60405180910390f35b348015610a7857600080fd5b50610a8161227b565b604051610a8e9190614776565b60405180910390f35b348015610aa357600080fd5b50610aac612281565b604051610ab99190614562565b60405180910390f35b348015610ace57600080fd5b50610ad76122ab565b604051610ae491906144a6565b60405180910390f35b348015610af957600080fd5b50610b146004803603810190610b0f9190614b61565b6122f9565b604051610b2191906143f2565b60405180910390f35b348015610b3657600080fd5b50610b516004803603810190610b4c9190614880565b61238d565b005b348015610b5f57600080fd5b50610b7a6004803603810190610b759190614880565b612411565b005b348015610b8857600080fd5b50610ba36004803603810190610b9e91906147e4565b612527565b604051610bb09190614776565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610c8457507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610cec57507f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610cfc5750610cfb826125b7565b5b9050919050565b606060018054610d1290614bd0565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3e90614bd0565b8015610d8b5780601f10610d6057610100808354040283529160200191610d8b565b820191906000526020600020905b815481529060010190602001808311610d6e57829003601f168201915b5050505050905090565b6000610da082612621565b610ddf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd690614c4e565b60405180910390fd5b6008600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610e2582611794565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8d90614cba565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610eb561268e565b73ffffffffffffffffffffffffffffffffffffffff161480610ee45750610ee381610ede61268e565b6122f9565b5b610f23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1a90614c4e565b60405180910390fd5b610f2e838383612696565b505050565b610f3b612748565b600c60009054906101000a900460ff1615610f5557600080fd5b80600b9080519060200190610f6b9291906141d2565b506001600c60006101000a81548160ff02191690831515021790555050565b6000600754600054610f9c9190614cda565b905090565b610fa9612748565b80601a9080519060200190610fbf9291906141d2565b5050565b610fce8383836127c6565b505050565b610fdb612748565b610fe481612d7f565b50565b60008083600d54610ff89190614d0e565b90506000601360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141561106857600d54611050600186611a7d565b61105a9190614d0e565b816110659190614cda565b90505b8091505092915050565b600061107d836118ca565b82106110be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b590614db4565b60405180910390fd5b60006110c8610f8a565b905060008060005b8381101561122e576000600560008381526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16146111c257806000015192505b8773ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561121a578684141561120b57819550505050505061126a565b838061121690614dd4565b9450505b50808061122690614dd4565b9150506110d0565b506040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126190614e69565b60405180910390fd5b92915050565b6000601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663461a4478836040518263ffffffff1660e01b81526004016112cd91906144a6565b60206040518083038186803b1580156112e557600080fd5b505afa1580156112f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131d9190614e9e565b90506113298382612d99565b505050565b611336612748565b601160009054906101000a900460ff1615601160006101000a81548160ff021916908315150217905550565b600d5481565b611370613152565b6000601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127106015546113c29190614efa565b6113cc9190614d0e565b90506000601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548261141b9190614cda565b905081601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060003373ffffffffffffffffffffffffffffffffffffffff168260405161148790614f5c565b60006040518083038185875af1925050503d80600081146114c4576040519150601f19603f3d011682016040523d82523d6000602084013e6114c9565b606091505b505090508061150d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150490614fbd565b60405180910390fd5b505050565b61152d83838360405180602001604052806000815250612099565b505050565b61153c8282612d99565b5050565b611548612748565b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161159e9190614562565b60206040518083038186803b1580156115b657600080fd5b505afa1580156115ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ee9190614ff2565b6040518363ffffffff1660e01b815260040161160b92919061501f565b602060405180830381600087803b15801561162557600080fd5b505af1158015611639573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165d919061505d565b5050565b600061166b610f8a565b82106116ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a3906150d6565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000dead73ffffffffffffffffffffffffffffffffffffffff166116ec83611794565b73ffffffffffffffffffffffffffffffffffffffff161415611743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173a90614db4565b60405180910390fd5b819050919050565b611753612748565b80601990805190602001906117699291906141d2565b5050565b611775612748565b61177e816131d6565b50565b601160009054906101000a900460ff1681565b600061179f826131f0565b600001519050919050565b600b80546117b790614bd0565b80601f01602080910402602001604051908101604052809291908181526020018280546117e390614bd0565b80156118305780601f1061180557610100808354040283529160200191611830565b820191906000526020600020905b81548152906001019060200180831161181357829003601f168201915b505050505081565b60606003805461184790614bd0565b80601f016020809104026020016040519081016040528092919081815260200182805461187390614bd0565b80156118c05780601f10611895576101008083540402835291602001916118c0565b820191906000526020600020905b8154815290600101906020018083116118a357829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561193b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193290615142565b60405180910390fd5b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169050919050565b7f000000000000000000000000000000000000000000000000000000000000dead81565b6119df612748565b6119e960006133ef565b565b6060600480546119fa90614bd0565b80601f0160208091040260200160405190810160405280929190818152602001828054611a2690614bd0565b8015611a735780601f10611a4857610100808354040283529160200191611a73565b820191906000526020600020905b815481529060010190602001808311611a5657829003601f168201915b5050505050905090565b600081831015611a8f57829050611a93565b8190505b92915050565b611acc611aa582611794565b7f000000000000000000000000000000000000000000000000000000000000dead836127c6565b60076000815480929190611adf90614dd4565b919050555050565b60136020528060005260406000206000915090505481565b611b07612748565b60006002811115611b1b57611b1a61493f565b5b816002811115611b2e57611b2d61493f565b5b1415611b3957600080fd5b80601160016101000a81548160ff02191690836002811115611b5e57611b5d61493f565b5b021790555050565b60016002811115611b7a57611b7961493f565b5b601160019054906101000a900460ff166002811115611b9c57611b9b61493f565b5b148015611bb65750601160009054906101000a900460ff16155b611bf5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bec906151ae565b60405180910390fd5b600e5481611c01610f8a565b611c0b91906142e8565b1115611c4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c439061521a565b60405180910390fd5b600f5481601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c9a91906142e8565b1115611cdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd290615286565b60405180910390fd5b6000611ce78233612527565b905034811115611d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d23906152f2565b60405180910390fd5b3460156000828254611d3e91906142e8565b9250508190555081601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d9091906142e8565b601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611de060008033856134b5565b600e54611deb610f8a565b1415611e1d576002601160016101000a81548160ff02191690836002811115611e1757611e1661493f565b5b02179055505b5050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611e53612748565b8060189080519060200190611e699291906141d2565b5050565b606060028054611e7c90614bd0565b80601f0160208091040260200160405190810160405280929190818152602001828054611ea890614bd0565b8015611ef55780601f10611eca57610100808354040283529160200191611ef5565b820191906000526020600020905b815481529060010190602001808311611ed857829003601f168201915b5050505050905090565b601160019054906101000a900460ff1681565b611f1a61268e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f7f90614c4e565b60405180910390fd5b8060096000611f9561268e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1661204261268e565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161208791906143f2565b60405180910390a35050565b600f5481565b6120a48484846127c6565b6120b0848484846134d7565b6120ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e69061535e565b60405180910390fd5b50505050565b60126020528060005260406000206000915090505481565b606061211882612621565b612157576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161214e9061535e565b60405180910390fd5b61216082612621565b61219f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121969061535e565b60405180910390fd5b6000600380546121ae90614bd0565b905011156121e85760036121c18361366e565b6040516020016121d29291906154e6565b6040516020818303038152906040529050612276565b600480546121f590614bd0565b80601f016020809104026020016040519081016040528092919081815260200182805461222190614bd0565b801561226e5780601f106122435761010080835404028352916020019161226e565b820191906000526020600020905b81548152906001019060200180831161225157829003601f168201915b505050505090505b919050565b600e5481565b6000601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060186019601a6122d23073ffffffffffffffffffffffffffffffffffffffff166137cf565b6040516020016122e59493929190615780565b604051602081830303815290604052905090565b6000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b612395612748565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612405576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123fc90615893565b60405180910390fd5b61240e816133ef565b50565b612419612748565b6000600281111561242d5761242c61493f565b5b601160019054906101000a900460ff16600281111561244f5761244e61493f565b5b1461248f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612486906151ae565b60405180910390fd5b600e54600a6010546124a19190614d0e565b6124a9610f8a565b6124b391906142e8565b11156124f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124eb9061521a565b60405180910390fd5b60005b600a8110156125235761251060016000846010546134b5565b808061251b90614dd4565b9150506124f7565b5050565b60008083600d546125389190614d0e565b90506000612545846118ca565b141561257557600d54612559600286611a7d565b6125639190614d0e565b8161256e9190614cda565b90506125ad565b6001612580846118ca565b14156125ac57600d54612594600186611a7d565b61259e9190614d0e565b816125a99190614cda565b90505b5b8091505092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600080548210801561268757507f000000000000000000000000000000000000000000000000000000000000dead73ffffffffffffffffffffffffffffffffffffffff1661266e83611794565b73ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b600033905090565b826008600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b61275061268e565b73ffffffffffffffffffffffffffffffffffffffff1661276e611e21565b73ffffffffffffffffffffffffffffffffffffffff16146127c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127bb906158ff565b60405180910390fd5b565b60006127d1826131f0565b90506000816000015173ffffffffffffffffffffffffffffffffffffffff166127f861268e565b73ffffffffffffffffffffffffffffffffffffffff161480612854575061281d61268e565b73ffffffffffffffffffffffffffffffffffffffff1661283c84610d95565b73ffffffffffffffffffffffffffffffffffffffff16145b80612870575061286f826000015161286a61268e565b6122f9565b5b9050806128b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128a990614c4e565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1614612924576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291b90614cba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612994576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161298b90615142565b60405180910390fd5b6129a18585856001613855565b6129b16000848460000151612696565b6001600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a90046fffffffffffffffffffffffffffffffff16612a1f919061593b565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506001600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a90046fffffffffffffffffffffffffffffffff16612ac3919061596f565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060405180604001604052808573ffffffffffffffffffffffffffffffffffffffff1681526020014267ffffffffffffffff168152506005600085815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509050506000600184612bc991906142e8565b9050600073ffffffffffffffffffffffffffffffffffffffff166005600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612d0f57612c3f81612621565b15612d0e576040518060400160405280846000015173ffffffffffffffffffffffffffffffffffffffff168152602001846020015167ffffffffffffffff168152506005600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509050505b5b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612d77868686600161385b565b505050505050565b8060049080519060200190612d959291906141d2565b5050565b60016002811115612dad57612dac61493f565b5b601160019054906101000a900460ff166002811115612dcf57612dce61493f565b5b148015612de95750601160009054906101000a900460ff16155b612e28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e1f906151ae565b60405180910390fd5b600e5482612e34610f8a565b612e3e91906142e8565b1115612e7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e769061521a565b60405180910390fd5b600f5482601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612ecd91906142e8565b1115612f0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f0590615286565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612f7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f7490615a01565b60405180910390fd5b6000612f898333610fe7565b905034811115612fce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fc5906152f2565b60405180910390fd5b3460156000828254612fe091906142e8565b9250508190555082601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461303291906142e8565b601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555082601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546130c091906142e8565b601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061311060003384866134b5565b600e5461311b610f8a565b141561314d576002601160016101000a81548160ff021916908360028111156131475761314661493f565b5b02179055505b505050565b6000601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054116131d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131cb90615a6d565b60405180910390fd5b565b80600390805190602001906131ec9291906141d2565b5050565b6131f8614258565b600054821061323c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161323390615ad9565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000006483106132a05760017f0000000000000000000000000000000000000000000000000000000000000064846132939190614cda565b61329d91906142e8565b90505b60008390505b8181106133ae576000600560008381526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff161461339a578093505050506133ea565b5080806133a690615af9565b9150506132a6565b506040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133e190614cba565b60405180910390fd5b919050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6134d18484848460405180602001604052806000815250613861565b50505050565b60006134f88473ffffffffffffffffffffffffffffffffffffffff16613f73565b15613661578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261352161268e565b8786866040518563ffffffff1660e01b81526004016135439493929190615b78565b602060405180830381600087803b15801561355d57600080fd5b505af192505050801561358e57506040513d601f19601f8201168201806040525081019061358b9190615bd9565b60015b613611573d80600081146135be576040519150601f19603f3d011682016040523d82523d6000602084013e6135c3565b606091505b50600081511415613609576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136009061535e565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050613666565b600190505b949350505050565b606060008214156136b6576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506137ca565b600082905060005b600082146136e85780806136d190614dd4565b915050600a826136e19190614efa565b91506136be565b60008167ffffffffffffffff811115613704576137036145f3565b5b6040519080825280601f01601f1916602001820160405280156137365781602001600182028036833780820191505090505b5090505b600085146137c35760018261374f9190614cda565b9150600a8561375e9190615c06565b603061376a91906142e8565b60f81b8183815181106137805761377f615c37565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856137bc9190614efa565b945061373a565b8093505050505b919050565b60606000821415613817576040518060400160405280600481526020017f30783030000000000000000000000000000000000000000000000000000000008152509050613850565b600082905060005b6000821461384157808061383290614dd4565b915050600882901c915061381f565b61384b8482613f96565b925050505b919050565b50505050565b50505050565b600080549050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156138d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016138ce90615142565b60405180910390fd5b6138e081612621565b15613920576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161391790614c4e565b60405180910390fd5b851561398e577f0000000000000000000000000000000000000000000000000000000000000064831115613989576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139809061521a565b60405180910390fd5b6139f2565b7f000000000000000000000000000000000000000000000000000000000000000a8311156139f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139e89061521a565b60405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614613a3457613a336000868386613855565b5b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614613a7457613a7385858386613855565b5b6000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff168152505090506040518060400160405280858360000151613b71919061596f565b6fffffffffffffffffffffffffffffffff168152602001858360200151613b98919061596f565b6fffffffffffffffffffffffffffffffff16815250600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060208201518160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555090505060405180604001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020014267ffffffffffffffff168152506005600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550905050600082905060005b85811015613edf57600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614613dcf57818873ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614613e5e57818773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b613e6b60008984886134d7565b8015613e7f5750613e7e888884886134d7565b5b613ebe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613eb59061535e565b60405180910390fd5b8180613ec990614dd4565b9250508080613ed790614dd4565b915050613d36565b5080600081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614613f2957613f28600088858861385b565b5b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614613f6957613f688787858861385b565b5b5050505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606060006002836002613fa99190614d0e565b613fb391906142e8565b67ffffffffffffffff811115613fcc57613fcb6145f3565b5b6040519080825280601f01601f191660200182016040528015613ffe5781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061403657614035615c37565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061409a57614099615c37565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026140da9190614d0e565b6140e491906142e8565b90505b6001811115614184577f3031323334353637383961626364656600000000000000000000000000000000600f86166010811061412657614125615c37565b5b1a60f81b82828151811061413d5761413c615c37565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061417d90615af9565b90506140e7565b50600084146141c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016141bf90615cb2565b60405180910390fd5b8091505092915050565b8280546141de90614bd0565b90600052602060002090601f0160209004810192826142005760008555614247565b82601f1061421957805160ff1916838001178555614247565b82800160010185558215614247579182015b8281111561424657825182559160200191906001019061422b565b5b5090506142549190614292565b5090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff1681525090565b5b808211156142ab576000816000905550600101614293565b5090565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006142f3826142af565b91506142fe836142af565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614333576143326142b9565b5b828201905092915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61438781614352565b811461439257600080fd5b50565b6000813590506143a48161437e565b92915050565b6000602082840312156143c0576143bf614348565b5b60006143ce84828501614395565b91505092915050565b60008115159050919050565b6143ec816143d7565b82525050565b600060208201905061440760008301846143e3565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561444757808201518184015260208101905061442c565b83811115614456576000848401525b50505050565b6000601f19601f8301169050919050565b60006144788261440d565b6144828185614418565b9350614492818560208601614429565b61449b8161445c565b840191505092915050565b600060208201905081810360008301526144c0818461446d565b905092915050565b6144d1816142af565b81146144dc57600080fd5b50565b6000813590506144ee816144c8565b92915050565b60006020828403121561450a57614509614348565b5b6000614518848285016144df565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061454c82614521565b9050919050565b61455c81614541565b82525050565b60006020820190506145776000830184614553565b92915050565b61458681614541565b811461459157600080fd5b50565b6000813590506145a38161457d565b92915050565b600080604083850312156145c0576145bf614348565b5b60006145ce85828601614594565b92505060206145df858286016144df565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61462b8261445c565b810181811067ffffffffffffffff8211171561464a576146496145f3565b5b80604052505050565b600061465d61433e565b90506146698282614622565b919050565b600067ffffffffffffffff821115614689576146886145f3565b5b6146928261445c565b9050602081019050919050565b82818337600083830152505050565b60006146c16146bc8461466e565b614653565b9050828152602081018484840111156146dd576146dc6145ee565b5b6146e884828561469f565b509392505050565b600082601f830112614705576147046145e9565b5b81356147158482602086016146ae565b91505092915050565b60006020828403121561473457614733614348565b5b600082013567ffffffffffffffff8111156147525761475161434d565b5b61475e848285016146f0565b91505092915050565b614770816142af565b82525050565b600060208201905061478b6000830184614767565b92915050565b6000806000606084860312156147aa576147a9614348565b5b60006147b886828701614594565b93505060206147c986828701614594565b92505060406147da868287016144df565b9150509250925092565b600080604083850312156147fb576147fa614348565b5b6000614809858286016144df565b925050602061481a85828601614594565b9150509250929050565b6000806040838503121561483b5761483a614348565b5b6000614849858286016144df565b925050602083013567ffffffffffffffff81111561486a5761486961434d565b5b614876858286016146f0565b9150509250929050565b60006020828403121561489657614895614348565b5b60006148a484828501614594565b91505092915050565b600080604083850312156148c4576148c3614348565b5b60006148d2858286016144df565b92505060206148e3858286016144df565b9150509250929050565b600381106148fa57600080fd5b50565b60008135905061490c816148ed565b92915050565b60006020828403121561492857614927614348565b5b6000614936848285016148fd565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6003811061497f5761497e61493f565b5b50565b60008190506149908261496e565b919050565b60006149a082614982565b9050919050565b6149b081614995565b82525050565b60006020820190506149cb60008301846149a7565b92915050565b6149da816143d7565b81146149e557600080fd5b50565b6000813590506149f7816149d1565b92915050565b60008060408385031215614a1457614a13614348565b5b6000614a2285828601614594565b9250506020614a33858286016149e8565b9150509250929050565b600067ffffffffffffffff821115614a5857614a576145f3565b5b614a618261445c565b9050602081019050919050565b6000614a81614a7c84614a3d565b614653565b905082815260208101848484011115614a9d57614a9c6145ee565b5b614aa884828561469f565b509392505050565b600082601f830112614ac557614ac46145e9565b5b8135614ad5848260208601614a6e565b91505092915050565b60008060008060808587031215614af857614af7614348565b5b6000614b0687828801614594565b9450506020614b1787828801614594565b9350506040614b28878288016144df565b925050606085013567ffffffffffffffff811115614b4957614b4861434d565b5b614b5587828801614ab0565b91505092959194509250565b60008060408385031215614b7857614b77614348565b5b6000614b8685828601614594565b9250506020614b9785828601614594565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680614be857607f821691505b60208210811415614bfc57614bfb614ba1565b5b50919050565b7f6100000000000000000000000000000000000000000000000000000000000000600082015250565b6000614c38600183614418565b9150614c4382614c02565b602082019050919050565b60006020820190508181036000830152614c6781614c2b565b9050919050565b7f6f00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614ca4600183614418565b9150614caf82614c6e565b602082019050919050565b60006020820190508181036000830152614cd381614c97565b9050919050565b6000614ce5826142af565b9150614cf0836142af565b925082821015614d0357614d026142b9565b5b828203905092915050565b6000614d19826142af565b9150614d24836142af565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614d5d57614d5c6142b9565b5b828202905092915050565b7f6200000000000000000000000000000000000000000000000000000000000000600082015250565b6000614d9e600183614418565b9150614da982614d68565b602082019050919050565b60006020820190508181036000830152614dcd81614d91565b9050919050565b6000614ddf826142af565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614e1257614e116142b9565b5b600182019050919050565b7f7500000000000000000000000000000000000000000000000000000000000000600082015250565b6000614e53600183614418565b9150614e5e82614e1d565b602082019050919050565b60006020820190508181036000830152614e8281614e46565b9050919050565b600081519050614e988161457d565b92915050565b600060208284031215614eb457614eb3614348565b5b6000614ec284828501614e89565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000614f05826142af565b9150614f10836142af565b925082614f2057614f1f614ecb565b5b828204905092915050565b600081905092915050565b50565b6000614f46600083614f2b565b9150614f5182614f36565b600082019050919050565b6000614f6782614f39565b9150819050919050565b7f5061796d656e74206661696c6564210000000000000000000000000000000000600082015250565b6000614fa7600f83614418565b9150614fb282614f71565b602082019050919050565b60006020820190508181036000830152614fd681614f9a565b9050919050565b600081519050614fec816144c8565b92915050565b60006020828403121561500857615007614348565b5b600061501684828501614fdd565b91505092915050565b60006040820190506150346000830185614553565b6150416020830184614767565b9392505050565b600081519050615057816149d1565b92915050565b60006020828403121561507357615072614348565b5b600061508184828501615048565b91505092915050565b7f6700000000000000000000000000000000000000000000000000000000000000600082015250565b60006150c0600183614418565b91506150cb8261508a565b602082019050919050565b600060208201905081810360008301526150ef816150b3565b9050919050565b7f3000000000000000000000000000000000000000000000000000000000000000600082015250565b600061512c600183614418565b9150615137826150f6565b602082019050919050565b6000602082019050818103600083015261515b8161511f565b9050919050565b7f7300000000000000000000000000000000000000000000000000000000000000600082015250565b6000615198600183614418565b91506151a382615162565b602082019050919050565b600060208201905081810360008301526151c78161518b565b9050919050565b7f6d00000000000000000000000000000000000000000000000000000000000000600082015250565b6000615204600183614418565b915061520f826151ce565b602082019050919050565b60006020820190508181036000830152615233816151f7565b9050919050565b7f6c00000000000000000000000000000000000000000000000000000000000000600082015250565b6000615270600183614418565b915061527b8261523a565b602082019050919050565b6000602082019050818103600083015261529f81615263565b9050919050565b7f7270000000000000000000000000000000000000000000000000000000000000600082015250565b60006152dc600283614418565b91506152e7826152a6565b602082019050919050565b6000602082019050818103600083015261530b816152cf565b9050919050565b7f7a00000000000000000000000000000000000000000000000000000000000000600082015250565b6000615348600183614418565b915061535382615312565b602082019050919050565b600060208201905081810360008301526153778161533b565b9050919050565b600081905092915050565b60008190508160005260206000209050919050565b600081546153ab81614bd0565b6153b5818661537e565b945060018216600081146153d057600181146153e157615414565b60ff19831686528186019350615414565b6153ea85615389565b60005b8381101561540c578154818901526001820191506020810190506153ed565b838801955050505b50505092915050565b7f2f00000000000000000000000000000000000000000000000000000000000000600082015250565b600061545360018361537e565b915061545e8261541d565b600182019050919050565b60006154748261440d565b61547e818561537e565b935061548e818560208601614429565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b60006154d060058361537e565b91506154db8261549a565b600582019050919050565b60006154f2828561539e565b91506154fd82615446565b91506155098284615469565b9150615514826154c3565b91508190509392505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c7b226e616d60008201527f65223a224372756465426f726e653a2045676773222c00000000000000000000602082015250565b600061557c60368361537e565b915061558782615520565b603682019050919050565b7f226465736372697074696f6e223a220000000000000000000000000000000000600082015250565b60006155c8600f8361537e565b91506155d382615592565b600f82019050919050565b7f222c000000000000000000000000000000000000000000000000000000000000600082015250565b600061561460028361537e565b915061561f826155de565b600282019050919050565b7f22696d616765223a220000000000000000000000000000000000000000000000600082015250565b600061566060098361537e565b915061566b8261562a565b600982019050919050565b7f2265787465726e616c5f6c696e6b223a22000000000000000000000000000000600082015250565b60006156ac60118361537e565b91506156b782615676565b601182019050919050565b7f2273656c6c65725f6665655f62617369735f706f696e7473223a3530302c226660008201527f65655f726563697069656e74223a220000000000000000000000000000000000602082015250565b600061571e602f8361537e565b9150615729826156c2565b602f82019050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b600061576a60028361537e565b915061577582615734565b600282019050919050565b600061578b8261556f565b9150615796826155bb565b91506157a2828761539e565b91506157ad82615607565b91506157b882615653565b91506157c4828661539e565b91506157cf82615607565b91506157da8261569f565b91506157e6828561539e565b91506157f182615607565b91506157fc82615711565b91506158088284615469565b91506158138261575d565b915081905095945050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061587d602683614418565b915061588882615821565b604082019050919050565b600060208201905081810360008301526158ac81615870565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006158e9602083614418565b91506158f4826158b3565b602082019050919050565b60006020820190508181036000830152615918816158dc565b9050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b60006159468261591f565b91506159518361591f565b925082821015615964576159636142b9565b5b828203905092915050565b600061597a8261591f565b91506159858361591f565b9250826fffffffffffffffffffffffffffffffff038211156159aa576159a96142b9565b5b828201905092915050565b7f6e73000000000000000000000000000000000000000000000000000000000000600082015250565b60006159eb600283614418565b91506159f6826159b5565b602082019050919050565b60006020820190508181036000830152615a1a816159de565b9050919050565b7f6e6f74206120726f79616c747920706179656500000000000000000000000000600082015250565b6000615a57601383614418565b9150615a6282615a21565b602082019050919050565b60006020820190508181036000830152615a8681615a4a565b9050919050565b7f7400000000000000000000000000000000000000000000000000000000000000600082015250565b6000615ac3600183614418565b9150615ace82615a8d565b602082019050919050565b60006020820190508181036000830152615af281615ab6565b9050919050565b6000615b04826142af565b91506000821415615b1857615b176142b9565b5b600182039050919050565b600081519050919050565b600082825260208201905092915050565b6000615b4a82615b23565b615b548185615b2e565b9350615b64818560208601614429565b615b6d8161445c565b840191505092915050565b6000608082019050615b8d6000830187614553565b615b9a6020830186614553565b615ba76040830185614767565b8181036060830152615bb98184615b3f565b905095945050505050565b600081519050615bd38161437e565b92915050565b600060208284031215615bef57615bee614348565b5b6000615bfd84828501615bc4565b91505092915050565b6000615c11826142af565b9150615c1c836142af565b925082615c2c57615c2b614ecb565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000615c9c602083614418565b9150615ca782615c66565b602082019050919050565b60006020820190508181036000830152615ccb81615c8f565b905091905056fea2646970667358221220af7f3bbe6aeef29d3cf5d1d5514fc0bd5fd8048ab944c8c902e7c2585591be7c64736f6c63430008090033
Verified Source Code Full Match
Compiler: v0.8.9+commit.e5eed63a
EVM: london
Optimization: No
IERC721Receiver.sol 27 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
ERC721.sol 624 lines
// SPDX-License-Identifier: Unlicense
// Creator: U dont need 2 know dat u farkers
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support burning tokens to address(0).
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 private currentIndex = 0;
uint256 internal immutable maxBatchSize;
uint256 internal immutable maxOwnerBatchSize;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Base URI
string private _baseURI;
string private _preRevealURI;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) private _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// // Mapping from tokens to burn status
// mapping(uint256 )
address public immutable burnAddress = 0x000000000000000000000000000000000000dEaD;
uint256 private numTokensBurned;
// 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
* `maxBatchSize` refers to how much a minter can mint at a time.
*/
constructor(
string memory name_,
string memory symbol_,
uint256 maxBatchSize_,
uint256 maxOwnerBatchSize_
) {
require(maxBatchSize_ > 0, "b");
_name = name_;
_symbol = symbol_;
maxBatchSize = maxBatchSize_;
maxOwnerBatchSize = maxOwnerBatchSize_;
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
return (currentIndex - numTokensBurned);
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view override returns (uint256) {
require(index < totalSupply(), "g");
require(ownerOf(index) != burnAddress, "b");
return index;
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
* This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
* It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
require(index < balanceOf(owner), "b");
uint256 numMintedSoFar = totalSupply();
uint256 tokenIdsIdx = 0;
address currOwnershipAddr = address(0);
for (uint256 i = 0; i < numMintedSoFar; i++) {
TokenOwnership memory ownership = _ownerships[i];
if (ownership.addr != address(0)) {
currOwnershipAddr = ownership.addr;
}
if (currOwnershipAddr == owner) {
if (tokenIdsIdx == index) {
return i;
}
tokenIdsIdx++;
}
}
revert("u");
}
/**
* @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 ||
interfaceId == type(IERC721Enumerable).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
require(owner != address(0), "0");
return uint256(_addressData[owner].balance);
}
// function numberMinted(address owner) external view returns (uint256) {
// require(owner != address(0), "0");
// return uint256(_addressData[owner].numberMinted);
// }
function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
require(tokenId < currentIndex, "t");
uint256 lowestTokenToCheck;
// if (tokenId >= maxBatchSize) {
// lowestTokenToCheck = tokenId - maxBatchSize + 1;
// }
if (tokenId >= maxOwnerBatchSize) {
lowestTokenToCheck = tokenId - maxOwnerBatchSize + 1;
}
for (uint256 curr = tokenId; curr >= lowestTokenToCheck; curr--) {
TokenOwnership memory ownership = _ownerships[curr];
if (ownership.addr != address(0)) {
return ownership;
}
}
revert("o");
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
return ownershipOf(tokenId).addr;
}
/**
* @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), "z");
// return bytes(_baseURI).length > 0 ? string(abi.encodePacked(_baseURI, tokenId.toString())) : _preRevealURI;
require(_exists(tokenId), "z");
// if (revealed) {
// return bytes(_baseURI).length > 0 ? string(abi.encodePacked(_baseURI, "/", tokenId.toString(), ".json")) : "";
// }
// else {
// return _baseURI;
// }
if (bytes(_baseURI).length > 0) {
return string(abi.encodePacked(_baseURI, "/", tokenId.toString(), ".json"));
}
else {
return _preRevealURI;
}
}
/**
* @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 overridden in child contracts.
*/
function baseURI() public view virtual returns (string memory) {
return _baseURI;
}
/**
* @dev Internal function to set the base URI for all token IDs. It is
* automatically added as a prefix to the value returned in {tokenURI},
* or to the token ID if {tokenURI} is empty.
*/
function _setBaseURI(string memory baseURI_) internal virtual {
_baseURI = baseURI_;
}
function preRevealURI() public view virtual returns (string memory) {
return _preRevealURI;
}
function _setPreRevealURI(string memory preRevealURI_) internal virtual {
_preRevealURI = preRevealURI_;
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "o");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"a"
);
_approve(to, tokenId, owner);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
require(_exists(tokenId), "a");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public override {
require(operator != _msgSender(), "a");
_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 override {
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
_transfer(from, to, tokenId);
require(
_checkOnERC721Received(from, to, tokenId, _data),
"z"
);
}
function burnToken(uint256 tokenId) public {
_transfer(ownerOf(tokenId), burnAddress, tokenId);
numTokensBurned++;
}
/**
* @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`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
return (tokenId < currentIndex && ownerOf(tokenId) != burnAddress);
}
// function _safeMint(address to, uint256 quantity) internal {
// _safeMint(to, quantity, "");
// }
function _safeMint(bool isPreMint, address from, address to, uint256 quantity) internal {
_safeMint(isPreMint, from, to, quantity, "");
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` cannot be larger than the max batch size.
*
* Emits a {Transfer} event.
*/
// function _safeMint(
// address to,
// uint256 quantity,
// bytes memory _data
// ) internal {
// uint256 startTokenId = currentIndex;
// require(to != address(0), "0");
// // We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering.
// require(!_exists(startTokenId), "a");
// require(quantity <= maxBatchSize, "m");
//
// _beforeTokenTransfers(address(0), to, startTokenId, quantity);
//
// AddressData memory addressData = _addressData[to];
// _addressData[to] = AddressData(
// addressData.balance + uint128(quantity),
// addressData.numberMinted + uint128(quantity)
// );
// _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp));
//
// uint256 updatedIndex = startTokenId;
//
// for (uint256 i = 0; i < quantity; i++) {
// emit Transfer(address(0), to, updatedIndex);
// require(
// _checkOnERC721Received(address(0), to, updatedIndex, _data),
// "z"
// );
// updatedIndex++;
// }
//
// currentIndex = updatedIndex;
// _afterTokenTransfers(address(0), to, startTokenId, quantity);
// }
function _safeMint(
bool isPreMint,
address from,
address to,
uint256 quantity,
bytes memory _data
) internal {
uint256 startTokenId = currentIndex;
require(to != address(0), "0");
// We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering.
require(!_exists(startTokenId), "a");
if (isPreMint) {
require(quantity <= maxOwnerBatchSize, "m");
}
else {
require(quantity <= maxBatchSize, "m");
}
if (from != address(0)) {
_beforeTokenTransfers(address(0), from, startTokenId, quantity);
}
if (from != to) {
_beforeTokenTransfers(from, to, startTokenId, quantity);
}
AddressData memory addressData = _addressData[to];
_addressData[to] = AddressData(
addressData.balance + uint128(quantity),
addressData.numberMinted + uint128(quantity)
);
_ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp));
uint256 updatedIndex = startTokenId;
for (uint256 i = 0; i < quantity; i++) {
if (from != address(0)) {
emit Transfer(address(0), from, updatedIndex);
}
if (from != to) {
emit Transfer(from, to, updatedIndex);
}
require(
_checkOnERC721Received(address(0), from, updatedIndex, _data) && _checkOnERC721Received(from, to, updatedIndex, _data),
"z"
);
updatedIndex++;
}
currentIndex = updatedIndex;
if (from != address(0)) {
_afterTokenTransfers(address(0), from, startTokenId, quantity);
}
if (from != to) {
_afterTokenTransfers(from, to, startTokenId, quantity);
}
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* 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
) private {
TokenOwnership memory prevOwnership = ownershipOf(tokenId);
bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
getApproved(tokenId) == _msgSender() ||
isApprovedForAll(prevOwnership.addr, _msgSender()));
require(isApprovedOrOwner, "a");
require(prevOwnership.addr == from, "o");
require(to != address(0), "0");
_beforeTokenTransfers(from, to, tokenId, 1);
// Clear approvals from the previous owner
_approve(address(0), tokenId, prevOwnership.addr);
_addressData[from].balance -= 1;
_addressData[to].balance += 1;
_ownerships[tokenId] = TokenOwnership(to, uint64(block.timestamp));
// If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
// Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
uint256 nextTokenId = tokenId + 1;
if (_ownerships[nextTokenId].addr == address(0)) {
if (_exists(nextTokenId)) {
_ownerships[nextTokenId] = TokenOwnership(prevOwnership.addr, prevOwnership.startTimestamp);
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
_tokenApprovals[tokenId] = to;
emit Approval(owner, to, tokenId);
}
// uint256 public nextOwnerToExplicitlySet = 0;
//
// /**
// * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf().
// */
// function _setOwnersExplicit(uint256 quantity) internal {
// uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet;
// require(quantity > 0, "q");
// uint256 endIndex = oldNextOwnerToSet + quantity - 1;
// if (endIndex > currentIndex - 1) {
// endIndex = currentIndex - 1;
// }
// // We know if the last one in the group exists, all in the group exist, due to serial ordering.
// require(_exists(endIndex), "n");
// for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) {
// if (_ownerships[i].addr == address(0)) {
// TokenOwnership memory ownership = ownershipOf(i);
// _ownerships[i] = TokenOwnership(ownership.addr, ownership.startTimestamp);
// }
// }
// nextOwnerToExplicitlySet = endIndex + 1;
// }
/**
* @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(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("z");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* 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`.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
////////////////////////////////////////
IERC721Metadata.sol 27 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
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);
}
IERC721Enumerable.sol 29 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)
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);
/**
* @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);
}
Address.sol 222 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
IERC20.sol 82 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
ECDSA.sol 232 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.0;
import "../Strings.sol";
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
} else if (error == RecoverError.InvalidSignatureV) {
revert("ECDSA: invalid signature 'v' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
// Check the signature length
// - case 65: r,s,v signature (standard)
// - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else if (signature.length == 64) {
bytes32 r;
bytes32 vs;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
vs := mload(add(signature, 0x40))
}
return tryRecover(hash, r, vs);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
if (v != 27 && v != 28) {
return (address(0), RecoverError.InvalidSignatureV);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
Strings.sol 75 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// 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);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}
ERC165.sol 29 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
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;
}
}
CrudeBorneEggs.sol 294 lines
// SPDX-License-Identifier: Unlicense
// Creator: U dont need 2 know dat u farkers
// ┻┳|
// ┻┳|
// ┳┻|
// ┳┻|
// ┻┳|
// ┻┳|
// ┳┻|
// ┳┻|
// ┻┳|
// ┳┻|
// ┻┳|
// ┳┻| _
// ┻┳| •.•) [환영하다, wat r u looking at]
// ┳┻|⊂ノ
// ┻┳|
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ERC721.sol";
import "./ENSResolver.sol";
// ꏸ꒓ꐇꁕꍟ
// _____ _______ __ _ ______ ________
// //. \ ||. \ ||. | ||. \ ||. \
// //. |☥. \ ||. | ||. \ ||.
// //. ||. / |☥. | ||. \ ||.
// |☥. ||._____/ ||. | ||. | ||.-----|
// \\. ||. \ \\. / ||. / |☥.
// \\. ||. \ \\. / |☥. / ||.
// \\.____/ ||. | \\.__/ ||.____/ ||.______/
// ꃃꆂ꒓ꁒꍟ
// 卵卵卵卵卵卵卵卵卵卵
contract CrudeBorneEggs is ERC721, Ownable {
using Strings for uint256;
string public PROVENANCE;
bool provenanceSet;
uint256 public treeFiddy;
uint256 public allOfDem;
uint256 public onlyDisMuch; // ‱‱‱‱‱‱‱‱‱‱
uint256 private disMuchForOwnur;
bool public paused;
enum MintStatus {
CrudeBirth,
CrudeBorne,
NoMore4U // ∏ø móår
}
MintStatus public mintStatus = MintStatus.CrudeBirth;
mapping(address => uint256) public totalMintsPerAddress;
mapping(address => uint256) public totalGiftsPerAddress;
mapping(address => uint256) private paymentInfo;
uint256 totalReceived = 0;
mapping(address => uint256) amountsWithdrawn;
modifier onlyPayee() {
_isPayee();
_;
}
function _isPayee() internal view virtual {
require(paymentInfo[msg.sender] > 0, "not a royalty payee");
}
ENSResolver fancyFrenFinder;
string collectionDescription = "CrudeBorne Eggs are the beginning of the CrudeBorne saga.";
string collecImg = "";
string externalLink = "https://crudeborne.wtf";
constructor(
string memory _name,
string memory _symbol,
uint256 _maxPossibleSupply,
uint256 _mintPrice,
uint256 _maxAllowedMints,
uint256 _maxOwnerAllowedMints,
address[] memory _payees,
uint128[] memory _basisPoints
) ERC721(_name, _symbol, _maxAllowedMints, _maxOwnerAllowedMints) {
allOfDem = _maxPossibleSupply;
treeFiddy = _mintPrice;
onlyDisMuch = _maxAllowedMints;
disMuchForOwnur = _maxOwnerAllowedMints;
for (uint256 i = 0; i < _payees.length; i++) {
paymentInfo[_payees[i]] = _basisPoints[i];
}
// ✼✼✼✼✼✼✼✼✼✼
fancyFrenFinder = new ENSResolver();
// ✺✺✺✺✺✺✺✺✺✺
}
function _ENSResolverAddress() public view returns (address) {
return address(fancyFrenFinder);
}
function flipPaused() external onlyOwner {
paused = !paused;
}
function preMint(address _to) public onlyOwner {
require(mintStatus == MintStatus.CrudeBirth, "s");
require(totalSupply() + disMuchForOwnur*10 <= allOfDem, "m");
// Wę fêėł łîkē ït
for (uint i = 0; i < 10; i++) {
_safeMint(true, address(0), _to, disMuchForOwnur);
}
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
require(!provenanceSet);
PROVENANCE = provenanceHash;
provenanceSet = true;
}
function setBaseURI(string memory baseURI) public onlyOwner {
_setBaseURI(baseURI);
}
function setPreRevealURI(string memory preRevealURI) public onlyOwner {
_setPreRevealURI(preRevealURI);
}
function changeMintStatus(MintStatus _status) external onlyOwner {
require(_status != MintStatus.CrudeBirth);
mintStatus = _status;
}
function min(uint256 x, uint256 y) public pure returns(uint256) {
if (x < y) {
return x;
}
return y;
}
function calculateMintCost(uint amount, address minter) public view returns(uint256) {
uint256 toReturn = treeFiddy * amount;
if (balanceOf(minter) == 0) {
toReturn -= min(2, amount)*treeFiddy;
}
else if (balanceOf(minter) == 1) {
toReturn -= min(1, amount)*treeFiddy;
}
return toReturn;
}
// 𝕰𝕲𝕲𝖅𝖅𝖅
function getDemEggz(uint amount) public payable {
require(mintStatus == MintStatus.CrudeBorne && !paused, "s");
require(totalSupply() + amount <= allOfDem, "m");
require(totalMintsPerAddress[msg.sender] + amount <= onlyDisMuch, "l");
uint256 requirePrice = calculateMintCost(amount, msg.sender);
require(requirePrice <= msg.value, "rp");
totalReceived += msg.value;
totalMintsPerAddress[msg.sender] = totalMintsPerAddress[msg.sender] + amount;
_safeMint(false, address(0), msg.sender, amount);
if (totalSupply() == allOfDem) {
mintStatus = MintStatus.NoMore4U;
}
}
function gibEggz2Fren(uint amount, address to) public payable {
_gibCrude2Fren(amount, to);
}
function gibEggz2FancyFren(uint amount, string memory ensAddr) public payable {
address to = fancyFrenFinder.resolve(ensAddr);
_gibCrude2Fren(amount, to);
}
function calculateGiftMintCost(
uint amount,
address giver
) public view returns(uint256) {
uint256 toReturn = treeFiddy * amount;
if (totalGiftsPerAddress[giver] == 0) {
toReturn -= min(1, amount)*treeFiddy;
}
return toReturn;
}
function _gibCrude2Fren(uint amount, address to) internal {
require(mintStatus == MintStatus.CrudeBorne && !paused, "s");
require(totalSupply() + amount <= allOfDem, "m");
require(totalMintsPerAddress[to] + amount <= onlyDisMuch, "l");
require(to != msg.sender, "ns");
uint256 requirePrice = calculateGiftMintCost(amount, msg.sender);
require(requirePrice <= msg.value, "rp");
totalReceived += msg.value;
totalMintsPerAddress[to] = totalMintsPerAddress[to] + amount;
totalGiftsPerAddress[msg.sender] = totalGiftsPerAddress[msg.sender] + amount;
_safeMint(false, msg.sender, to, amount);
if (totalSupply() == allOfDem) {
mintStatus = MintStatus.NoMore4U;
}
}
// ρ(௶؆ξ) ∺ 爪(ϒ६∑ナ)/∰(¥Ꭿ₸ໂ) //
function setCollectionDescription(string memory _collectionDescription) public onlyOwner {
collectionDescription = _collectionDescription;
}
function setCollecImg(string memory _collecImg) public onlyOwner {
collecImg = _collecImg;
}
function setExternalLink(string memory _externalLink) public onlyOwner {
externalLink = _externalLink;
}
function contractURI() public view returns (string memory) {
return string(
abi.encodePacked(
"data:application/json;utf8,{\"name\":\"CrudeBorne: Eggs\",",
"\"description\":\"", collectionDescription, "\",",
"\"image\":\"", collecImg, "\",",
"\"external_link\":\"", externalLink, "\",",
"\"seller_fee_basis_points\":500,\"fee_recipient\":\"",
uint256(uint160(address(this))).toHexString(), "\"}"
)
);
}
// 🝧.🜖.Ω //
receive() external payable {
totalReceived += msg.value;
}
function withdraw() public onlyPayee {
uint256 totalForPayee = (totalReceived/10000)*paymentInfo[msg.sender];
uint256 toWithdraw = totalForPayee - amountsWithdrawn[msg.sender];
amountsWithdrawn[msg.sender] = totalForPayee;
(bool success, ) = payable(msg.sender).call{value: toWithdraw}("");
require(success, "Payment failed!");
}
// 01001110 01100101 01110110 01100101 01110010 00100000 01100111 01101111
// 01101110 01101110 01100001 00100000 01100111 01101001 01110110 01100101
// 00100000 01111001 01101111 01110101 00100000 01110101 01110000 00001101
// 00001010 01001110 01100101 01110110 01100101 01110010 00100000 01100111
// 01101111 01101110 01101110 01100001 00100000 01101100 01100101 01110100
// 00100000 01111001 01101111 01110101 00100000 01100100 01101111 01110111
// 01101110 00001101 00001010 01001110 01100101 01110110 01100101 01110010
// 00100000 01100111 01101111 01101110 01101110 01100001 00100000 01110010
// 01110101 01101110 00100000 01100001 01110010 01101111 01110101 01101110
// 01100100 00100000 01100001 01101110 01100100 00100000 01100100 01100101
// 01110011 01100101 01110010 01110100 00100000 01111001 01101111 01110101
// 00001101 00001010 01001110 01100101 01110110 01100101 01110010 00100000
// 01100111 01101111 01101110 01101110 01100001 00100000 01101101 01100001
// 01101011 01100101 00100000 01111001 01101111 01110101 00100000 01100011
// 01110010 01111001 00001101 00001010 01001110 01100101 01110110 01100101
// 01110010 00100000 01100111 01101111 01101110 01101110 01100001 00100000
// 01110011 01100001 01111001 00100000 01100111 01101111 01101111 01100100
// 01100010 01111001 01100101 00001101 00001010 01001110 01100101 01110110
// 01100101 01110010 00100000 01100111 01101111 01101110 01101110 01100001
// 00100000 01110100 01100101 01101100 01101100 00100000 01100001 00100000
// 01101100 01101001 01100101 00100000 01100001 01101110 01100100 00100000
// 01101000 01110101 01110010 01110100 00100000 01111001 01101111 01110101
function withdrawTokens(address tokenAddress) external onlyOwner() {
IERC20(tokenAddress).transfer(msg.sender, IERC20(tokenAddress).balanceOf(address(this)));
}
// ////\\ //||\\ //\|\\ ///||\
// /`O-O' ` @ @\ //o o// a a
// ] > ) | ( _)
// - - - ~
}
IERC721.sol 143 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)
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`.
*
* 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;
/**
* @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 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 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 the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @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);
}
ENSResolver.sol 42 lines
// SPDX-License-Identifier: Unlicense
// Creator: U dont need 2 know dat u farkers
pragma solidity ^0.8.9;
contract ENSResolver {
// Same address for Mainnet, Ropsten, Rinkerby, Gorli and other networks;
ENS ens = ENS(0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e);
function computeNameHash(bytes memory _name) private pure returns (bytes32 nameHash) {
nameHash = 0x0000000000000000000000000000000000000000000000000000000000000000;
nameHash = keccak256(abi.encodePacked(keccak256(abi.encodePacked(nameHash, keccak256(abi.encodePacked("eth")))),keccak256(abi.encodePacked(_name))));
}
function resolve(string memory _name) public virtual view returns (address) {
bytes memory name = abi.encodePacked(_name);
uint nameLength = name.length;
require(nameLength > 7, "impossible ENS address");
require(
name[nameLength-4] == 0x2E &&
name[nameLength-3] == 0x65 &&
name[nameLength-2] == 0x74 &&
name[nameLength-1] == 0x68,
"ENS name must end with \".eth\""
);
bytes memory strippedName = new bytes(nameLength-4);
for (uint i = 0; i < nameLength-4; i++) {
strippedName[i] = name[i];
}
Resolver resolver = ens.resolver(computeNameHash(strippedName));
return resolver.addr(computeNameHash(strippedName));
}
}
abstract contract ENS {
function resolver(bytes32 node) public virtual view returns (Resolver);
}
abstract contract Resolver {
function addr(bytes32 node) public virtual view returns (address);
}
Read Contract
PROVENANCE 0x6373a6b1 → string
_ENSResolverAddress 0xe7064f35 → address
allOfDem 0xe430e334 → uint256
balanceOf 0x70a08231 → uint256
baseURI 0x6c0360eb → string
burnAddress 0x70d5ae05 → address
calculateGiftMintCost 0x2ee65845 → uint256
calculateMintCost 0xfda424cc → uint256
contractURI 0xe8a3d485 → string
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
min 0x7ae2b5c7 → uint256
mintStatus 0x9da3f8fd → uint8
name 0x06fdde03 → string
onlyDisMuch 0xa867e43b → uint256
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
preRevealURI 0x79b6ed36 → string
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalGiftsPerAddress 0x7b697040 → uint256
totalMintsPerAddress 0xb9bd2801 → uint256
totalSupply 0x18160ddd → uint256
treeFiddy 0x39f1cced → uint256
Write Contract 22 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
burnToken 0x7b47ec1a
uint256 tokenId
changeMintStatus 0x7cac2602
uint8 _status
flipPaused 0x333171bb
No parameters
getDemEggz 0x8825169d
uint256 amount
gibEggz2FancyFren 0x30cac524
uint256 amount
string ensAddr
gibEggz2Fren 0x472967e9
uint256 amount
address to
preMint 0xfd955ed9
address _to
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
setCollecImg 0x52c2dd16
string _collecImg
setCollectionDescription 0x9471302e
string _collectionDescription
setExternalLink 0x1f917921
string _externalLink
setPreRevealURI 0x2a85db55
string preRevealURI
setProvenanceHash 0x10969523
string provenanceHash
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters
withdrawTokens 0x49df728c
address tokenAddress
Token Balances (1)
View Transfers →Recent Transactions
No transactions found for this address