Address Contract Verified
Address
0x083FEd9c3A2AB4d2541c95652d2068A8a471716f
Balance
0 ETH
Nonce
1
Code Size
21513 bytes
Creator
0xb75A08E8...A29a at tx 0x5af46f00...8c99c2
Indexed Transactions
0
Contract Bytecode
21513 bytes
0x6080604052600436106102305760003560e01c806370a082311161012e578063a0712d68116100ab578063e81f799d1161006f578063e81f799d14610841578063e985e9c514610880578063f2fde38b146108bd578063f4a0a528146108e6578063ff310af91461090f57610230565b8063a0712d681461076d578063a22cb46514610789578063b88d4fde146107b2578063bedb86fb146107db578063c87b56dd1461080457610230565b8063853828b6116100f2578063853828b6146106985780638d859f3e146106af5780638da5cb5b146106da57806395d89b4114610705578063967d61d91461073057610230565b806370a08231146105b3578063715018a6146105f057806371f9f200146106075780637501f741146106305780637f81be691461065b57610230565b806332624114116101bc578063547520fe11610180578063547520fe146104e45780636352211e1461050d57806366474ff71461054a5780636bd98660146105735780636d4899351461058a57610230565b806332624114146103ed5780633502a7161461042a57806342842e0e14610455578063438b63001461047e57806348f3afed146104bb57610230565b80630dc28efe116102035780630dc28efe1461030357806318160ddd1461031f57806323b872dd1461034a57806326a49e37146103735780632f745c59146103b057610230565b806301ffc9a71461023557806306fdde0314610272578063081812fc1461029d578063095ea7b3146102da575b600080fd5b34801561024157600080fd5b5061025c60048036038101906102579190613a3d565b610938565b6040516102699190614375565b60405180910390f35b34801561027e57600080fd5b506102876109b2565b60405161029491906143d5565b60405180910390f35b3480156102a957600080fd5b506102c460048036038101906102bf9190613af6565b610a44565b6040516102d191906142ec565b60405180910390f35b3480156102e657600080fd5b5061030160048036038101906102fc9190613975565b610ac9565b005b61031d60048036038101906103189190613b1f565b610be1565b005b34801561032b57600080fd5b50610334610d1e565b6040516103419190614757565b60405180910390f35b34801561035657600080fd5b50610371600480360381019061036c919061386f565b610d2f565b005b34801561037f57600080fd5b5061039a60048036038101906103959190613af6565b610d8f565b6040516103a79190614757565b60405180910390f35b3480156103bc57600080fd5b506103d760048036038101906103d29190613975565b610dad565b6040516103e49190614757565b60405180910390f35b3480156103f957600080fd5b50610414600480360381019061040f91906139b1565b610e52565b6040516104219190614375565b60405180910390f35b34801561043657600080fd5b5061043f610f39565b60405161044c9190614757565b60405180910390f35b34801561046157600080fd5b5061047c6004803603810190610477919061386f565b610f3f565b005b34801561048a57600080fd5b506104a560048036038101906104a0919061380a565b610f5f565b6040516104b29190614353565b60405180910390f35b3480156104c757600080fd5b506104e260048036038101906104dd9190613a8f565b611059565b005b3480156104f057600080fd5b5061050b60048036038101906105069190613af6565b611221565b005b34801561051957600080fd5b50610534600480360381019061052f9190613af6565b6112a7565b60405161054191906142ec565b60405180910390f35b34801561055657600080fd5b50610571600480360381019061056c9190613af6565b611359565b005b34801561057f57600080fd5b50610588611438565b005b34801561059657600080fd5b506105b160048036038101906105ac9190613af6565b6114c4565b005b3480156105bf57600080fd5b506105da60048036038101906105d5919061380a565b61154a565b6040516105e79190614757565b60405180910390f35b3480156105fc57600080fd5b50610605611602565b005b34801561061357600080fd5b5061062e60048036038101906106299190613af6565b61168a565b005b34801561063c57600080fd5b50610645611754565b6040516106529190614757565b60405180910390f35b34801561066757600080fd5b50610682600480360381019061067d9190613af6565b61175a565b60405161068f91906142ec565b60405180910390f35b3480156106a457600080fd5b506106ad611797565b005b3480156106bb57600080fd5b506106c461188c565b6040516106d19190614757565b60405180910390f35b3480156106e657600080fd5b506106ef611892565b6040516106fc91906142ec565b60405180910390f35b34801561071157600080fd5b5061071a6118bc565b60405161072791906143d5565b60405180910390f35b34801561073c57600080fd5b5061075760048036038101906107529190613b5b565b61194e565b6040516107649190614353565b60405180910390f35b61078760048036038101906107829190613af6565b611a81565b005b34801561079557600080fd5b506107b060048036038101906107ab9190613939565b611cbe565b005b3480156107be57600080fd5b506107d960048036038101906107d491906138be565b611e3f565b005b3480156107e757600080fd5b5061080260048036038101906107fd9190613a14565b611ea1565b005b34801561081057600080fd5b5061082b60048036038101906108269190613af6565b611f80565b60405161083891906143d5565b60405180910390f35b34801561084d57600080fd5b5061086860048036038101906108639190613af6565b612063565b60405161087793929190614772565b60405180910390f35b34801561088c57600080fd5b506108a760048036038101906108a29190613833565b612125565b6040516108b49190614375565b60405180910390f35b3480156108c957600080fd5b506108e460048036038101906108df919061380a565b6121b9565b005b3480156108f257600080fd5b5061090d60048036038101906109089190613af6565b6122b1565b005b34801561091b57600080fd5b5061093660048036038101906109319190613975565b612337565b005b60007f2f745c59000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109ab57506109aa82612451565b5b9050919050565b6060600080546109c190614aca565b80601f01602080910402602001604051908101604052809291908181526020018280546109ed90614aca565b8015610a3a5780601f10610a0f57610100808354040283529160200191610a3a565b820191906000526020600020905b815481529060010190602001808311610a1d57829003601f168201915b5050505050905090565b6000610a4f82612533565b610a8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a85906145b7565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610ad4826112a7565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3c90614677565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610b6461259f565b73ffffffffffffffffffffffffffffffffffffffff161480610b935750610b9281610b8d61259f565b612125565b5b610bd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc990614517565b60405180910390fd5b610bdc83836125a7565b505050565b610be961259f565b73ffffffffffffffffffffffffffffffffffffffff16610c07611892565b73ffffffffffffffffffffffffffffffffffffffff1614610c5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c54906145d7565b60405180910390fd5b60026009541415610ca3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9a90614717565b60405180910390fd5b60026009819055506000610cb5610d1e565b9050600c548382610cc691906148e8565b1115610d07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfe906144d7565b60405180910390fd5b610d118383612660565b5060016009819055505050565b6000610d2a60126123ff565b905090565b610d40610d3a61259f565b826126f7565b610d7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d76906146f7565b60405180910390fd5b610d8a8383836127d5565b505050565b6000610da682600d54612a3190919063ffffffff16565b9050919050565b6000610db88361154a565b8210610df9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df0906143f7565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b60008085604051602001610e669190614250565b6040516020818303038152906040528051906020012090506000600182604051602001610e9391906142b1565b6040516020818303038152906040528051906020012087878760405160008152602001604052604051610ec99493929190614390565b6020604051602081039080840390855afa158015610eeb573d6000803e3d6000fd5b5050506020604051035190508073ffffffffffffffffffffffffffffffffffffffff16610f16611892565b73ffffffffffffffffffffffffffffffffffffffff161492505050949350505050565b600c5481565b610f5a83838360405180602001604052806000815250611e3f565b505050565b60606000610f6c8361154a565b905060008167ffffffffffffffff811115610fb0577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015610fde5781602001602082028036833780820191505090505b50905060005b8281101561104e57610ff68582610dad565b82828151811061102f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001018181525050808061104690614b2d565b915050610fe4565b508092505050919050565b61106161259f565b73ffffffffffffffffffffffffffffffffffffffff1661107f611892565b73ffffffffffffffffffffffffffffffffffffffff16146110d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cc906145d7565b60405180910390fd5b600b6040516110e4919061426b565b60405180910390206110f583611f80565b805190602001201461113c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611133906146b7565b60405180910390fd5b600b60405161114b919061426b565b604051809103902061115c82611f80565b80519060200120146111a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119a90614537565b60405180910390fd5b6013604051806060016040528084815260200183815260200185815250908060018154018082558091505060019003906000526020600020906003020160009091909190915060008201518160000155602082015181600101556040820151816002019080519060200190611219929190613569565b505050505050565b61122961259f565b73ffffffffffffffffffffffffffffffffffffffff16611247611892565b73ffffffffffffffffffffffffffffffffffffffff161461129d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611294906145d7565b60405180910390fd5b80600e8190555050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611350576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134790614577565b60405180910390fd5b80915050919050565b61136161259f565b73ffffffffffffffffffffffffffffffffffffffff1661137f611892565b73ffffffffffffffffffffffffffffffffffffffff16146113d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113cc906145d7565b60405180910390fd5b601160009054906101000a900460ff16611424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141b90614657565b60405180910390fd5b61143581611430611892565b612660565b50565b61144061259f565b73ffffffffffffffffffffffffffffffffffffffff1661145e611892565b73ffffffffffffffffffffffffffffffffffffffff16146114b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ab906145d7565b60405180910390fd5b601360006114c291906135ef565b565b6114cc61259f565b73ffffffffffffffffffffffffffffffffffffffff166114ea611892565b73ffffffffffffffffffffffffffffffffffffffff1614611540576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611537906145d7565b60405180910390fd5b80600a8190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b290614557565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61160a61259f565b73ffffffffffffffffffffffffffffffffffffffff16611628611892565b73ffffffffffffffffffffffffffffffffffffffff161461167e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611675906145d7565b60405180910390fd5b6116886000612a47565b565b61169261259f565b73ffffffffffffffffffffffffffffffffffffffff166116b0611892565b73ffffffffffffffffffffffffffffffffffffffff1614611706576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116fd906145d7565b60405180910390fd5b80600c541061174a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174190614457565b60405180910390fd5b80600c8190555050565b600e5481565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b61179f61259f565b73ffffffffffffffffffffffffffffffffffffffff166117bd611892565b73ffffffffffffffffffffffffffffffffffffffff1614611813576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180a906145d7565b60405180910390fd5b60004790506000811161182557600080fd5b611878600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611873606461186560105486612a3190919063ffffffff16565b612b0d90919063ffffffff16565b612b23565b611889611883611892565b47612b23565b50565b600d5481565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600180546118cb90614aca565b80601f01602080910402602001604051908101604052809291908181526020018280546118f790614aca565b80156119445780601f1061191957610100808354040283529160200191611944565b820191906000526020600020905b81548152906001019060200180831161192757829003601f168201915b5050505050905090565b606060008267ffffffffffffffff811115611992577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156119c05781602001602082028036833780820191505090505b50905060005b83811015611a7657600085826119dc91906148e8565b9050600073ffffffffffffffffffffffffffffffffffffffff166119ff8261175a565b73ffffffffffffffffffffffffffffffffffffffff161415611a625780838381518110611a55577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181815250505b508080611a6e90614b2d565b9150506119c6565b508091505092915050565b600c54611a8c610d1e565b1115611acd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ac490614737565b60405180910390fd5b601160009054906101000a900460ff1615611b1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b1490614697565b60405180910390fd5b60026009541415611b63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5a90614717565b60405180910390fd5b6002600981905550600a544211611baf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba690614617565b60405180910390fd5b6000611bb9610d1e565b9050600e54821115611c00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf7906144d7565b60405180910390fd5b600c548282611c0f91906148e8565b1115611c50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c47906144d7565b60405180910390fd5b611c5982610d8f565b341015611c9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c9290614637565b60405180910390fd5b6000611ca561259f565b9050611cb18382612660565b5050600160098190555050565b611cc661259f565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d2b906144b7565b60405180910390fd5b8060056000611d4161259f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611dee61259f565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611e339190614375565b60405180910390a35050565b611e50611e4a61259f565b836126f7565b611e8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e86906146f7565b60405180910390fd5b611e9b84848484612bd4565b50505050565b611ea961259f565b73ffffffffffffffffffffffffffffffffffffffff16611ec7611892565b73ffffffffffffffffffffffffffffffffffffffff1614611f1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f14906145d7565b60405180910390fd5b80601160006101000a81548160ff0219169083151502179055507f10e1c3fcaff06b68391033547e8f9bb8067d7c4a2e32659b0629153814d242d3601160009054906101000a900460ff16604051611f759190614375565b60405180910390a150565b60606000601380549050905060005b8181101561204957600060138281548110611fd3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060030201905084816000015411158015611ffb575084816001015410155b15612037578060020161200d86612c30565b60405160200161201e929190614282565b604051602081830303815290604052935050505061205e565b508061204290614b2d565b9050611f8f565b50604051806020016040528060008152509150505b919050565b6013818154811061207357600080fd5b90600052602060002090600302016000915090508060000154908060010154908060020180546120a290614aca565b80601f01602080910402602001604051908101604052809291908181526020018280546120ce90614aca565b801561211b5780601f106120f05761010080835404028352916020019161211b565b820191906000526020600020905b8154815290600101906020018083116120fe57829003601f168201915b5050505050905083565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6121c161259f565b73ffffffffffffffffffffffffffffffffffffffff166121df611892565b73ffffffffffffffffffffffffffffffffffffffff1614612235576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161222c906145d7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156122a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161229c90614437565b60405180910390fd5b6122ae81612a47565b50565b6122b961259f565b73ffffffffffffffffffffffffffffffffffffffff166122d7611892565b73ffffffffffffffffffffffffffffffffffffffff161461232d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612324906145d7565b60405180910390fd5b80600d8190555050565b61233f61259f565b73ffffffffffffffffffffffffffffffffffffffff1661235d611892565b73ffffffffffffffffffffffffffffffffffffffff16146123b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123aa906145d7565b60405180910390fd5b81600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806010819055505050565b600081600001549050919050565b6000818361241b91906148e8565b905092915050565b6001816000016000828254019250508190555050565b600080823b905060008111915050919050565b505050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061251c57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061252c575061252b82612ddd565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661261a836112a7565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60005b828160ff1610156126f2575b600073ffffffffffffffffffffffffffffffffffffffff166126ac6126a7600161269960126123ff565b61240d90919063ffffffff16565b61175a565b73ffffffffffffffffffffffffffffffffffffffff16146126d6576126d16012612423565b61266f565b6126df82612e47565b80806126ea90614b76565b915050612663565b505050565b600061270282612533565b612741576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612738906144f7565b60405180910390fd5b600061274c836112a7565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806127bb57508373ffffffffffffffffffffffffffffffffffffffff166127a384610a44565b73ffffffffffffffffffffffffffffffffffffffff16145b806127cc57506127cb8185612125565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166127f5826112a7565b73ffffffffffffffffffffffffffffffffffffffff161461284b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612842906145f7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156128bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128b290614497565b60405180910390fd5b6128c6838383612e9d565b6128d16000826125a7565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461292191906149c9565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461297891906148e8565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60008183612a3f919061496f565b905092915050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008183612b1b919061493e565b905092915050565b60008273ffffffffffffffffffffffffffffffffffffffff1682604051612b49906142d7565b60006040518083038185875af1925050503d8060008114612b86576040519150601f19603f3d011682016040523d82523d6000602084013e612b8b565b606091505b5050905080612bcf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bc6906146d7565b60405180910390fd5b505050565b612bdf8484846127d5565b612beb84848484612f9f565b612c2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c2190614417565b60405180910390fd5b50505050565b60606000821415612c78576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612dd8565b600082905060005b60008214612caa578080612c9390614b2d565b915050600a82612ca3919061493e565b9150612c80565b60008167ffffffffffffffff811115612cec577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d1e5781602001600182028036833780820191505090505b5090505b60008514612dd157600182612d3791906149c9565b9150600a85612d469190614bce565b6030612d5291906148e8565b60f81b818381518110612d8e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612dca919061493e565b9450612d22565b8093505050505b919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b612e516012612423565b612e6481612e5f60126123ff565b613136565b612e6e60126123ff565b7f7db775057d4ddbbbb2b0b86c2644ff0bfb090d4e217ff7ef331f9b1d0ac9bdd760405160405180910390a250565b612ea883838361244c565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015612f115750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15612f2157612f208382613154565b5b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015612f8a5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612f9a57612f9982826132c1565b5b505050565b6000612fc08473ffffffffffffffffffffffffffffffffffffffff16612439565b15613129578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612fe961259f565b8786866040518563ffffffff1660e01b815260040161300b9493929190614307565b602060405180830381600087803b15801561302557600080fd5b505af192505050801561305657506040513d601f19601f820116820180604052508101906130539190613a66565b60015b6130d9573d8060008114613086576040519150601f19603f3d011682016040523d82523d6000602084013e61308b565b606091505b506000815114156130d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130c890614417565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061312e565b600190505b949350505050565b613150828260405180602001604052806000815250613340565b5050565b600060016131618461154a565b61316b91906149c9565b9050600060076000848152602001908152602001600020549050818114613250576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b60006132cc8361154a565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b61334a838361339b565b6133576000848484612f9f565b613396576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161338d90614417565b60405180910390fd5b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561340b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161340290614597565b60405180910390fd5b61341481612533565b15613454576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161344b90614477565b60405180910390fd5b61346060008383612e9d565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546134b091906148e8565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b82805461357590614aca565b90600052602060002090601f01602090048101928261359757600085556135de565b82601f106135b057805160ff19168380011785556135de565b828001600101855582156135de579182015b828111156135dd5782518255916020019190600101906135c2565b5b5090506135eb9190613613565b5090565b50805460008255600302906000526020600020908101906136109190613630565b50565b5b8082111561362c576000816000905550600101613614565b5090565b5b8082111561366357600080820160009055600182016000905560028201600061365a9190613667565b50600301613631565b5090565b50805461367390614aca565b6000825580601f1061368557506136a4565b601f0160209004906000526020600020908101906136a39190613613565b5b50565b60006136ba6136b5846147d5565b6147b0565b9050828152602081018484840111156136d257600080fd5b6136dd848285614a88565b509392505050565b60006136f86136f384614806565b6147b0565b90508281526020810184848401111561371057600080fd5b61371b848285614a88565b509392505050565b60008135905061373281615349565b92915050565b60008135905061374781615360565b92915050565b60008135905061375c81615377565b92915050565b6000813590506137718161538e565b92915050565b6000815190506137868161538e565b92915050565b600082601f83011261379d57600080fd5b81356137ad8482602086016136a7565b91505092915050565b600082601f8301126137c757600080fd5b81356137d78482602086016136e5565b91505092915050565b6000813590506137ef816153a5565b92915050565b600081359050613804816153bc565b92915050565b60006020828403121561381c57600080fd5b600061382a84828501613723565b91505092915050565b6000806040838503121561384657600080fd5b600061385485828601613723565b925050602061386585828601613723565b9150509250929050565b60008060006060848603121561388457600080fd5b600061389286828701613723565b93505060206138a386828701613723565b92505060406138b4868287016137e0565b9150509250925092565b600080600080608085870312156138d457600080fd5b60006138e287828801613723565b94505060206138f387828801613723565b9350506040613904878288016137e0565b925050606085013567ffffffffffffffff81111561392157600080fd5b61392d8782880161378c565b91505092959194509250565b6000806040838503121561394c57600080fd5b600061395a85828601613723565b925050602061396b85828601613738565b9150509250929050565b6000806040838503121561398857600080fd5b600061399685828601613723565b92505060206139a7858286016137e0565b9150509250929050565b600080600080608085870312156139c757600080fd5b60006139d587828801613723565b94505060206139e6878288016137f5565b93505060406139f78782880161374d565b9250506060613a088782880161374d565b91505092959194509250565b600060208284031215613a2657600080fd5b6000613a3484828501613738565b91505092915050565b600060208284031215613a4f57600080fd5b6000613a5d84828501613762565b91505092915050565b600060208284031215613a7857600080fd5b6000613a8684828501613777565b91505092915050565b600080600060608486031215613aa457600080fd5b600084013567ffffffffffffffff811115613abe57600080fd5b613aca868287016137b6565b9350506020613adb868287016137e0565b9250506040613aec868287016137e0565b9150509250925092565b600060208284031215613b0857600080fd5b6000613b16848285016137e0565b91505092915050565b60008060408385031215613b3257600080fd5b6000613b40858286016137e0565b9250506020613b5185828601613723565b9150509250929050565b60008060408385031215613b6e57600080fd5b6000613b7c858286016137e0565b9250506020613b8d858286016137e0565b9150509250929050565b6000613ba38383614223565b60208301905092915050565b613bb8816149fd565b82525050565b613bcf613bca826149fd565b614ba0565b82525050565b6000613be082614871565b613bea818561489f565b9350613bf583614837565b8060005b83811015613c26578151613c0d8882613b97565b9750613c1883614892565b925050600181019050613bf9565b5085935050505092915050565b613c3c81614a0f565b82525050565b613c4b81614a1b565b82525050565b613c62613c5d82614a1b565b614bb2565b82525050565b6000613c738261487c565b613c7d81856148b0565b9350613c8d818560208601614a97565b613c9681614cbb565b840191505092915050565b60008154613cae81614aca565b613cb881866148c1565b94506001821660008114613cd35760018114613ce457613d17565b60ff19831686528186019350613d17565b613ced85614847565b60005b83811015613d0f57815481890152600182019150602081019050613cf0565b838801955050505b50505092915050565b6000613d2b82614887565b613d3581856148cc565b9350613d45818560208601614a97565b613d4e81614cbb565b840191505092915050565b6000613d6482614887565b613d6e81856148dd565b9350613d7e818560208601614a97565b80840191505092915050565b60008154613d9781614aca565b613da181866148dd565b94506001821660008114613dbc5760018114613dcd57613e00565b60ff19831686528186019350613e00565b613dd68561485c565b60005b83811015613df857815481890152600182019150602081019050613dd9565b838801955050505b50505092915050565b6000613e16601c836148dd565b9150613e2182614cd9565b601c82019050919050565b6000613e39602b836148cc565b9150613e4482614d02565b604082019050919050565b6000613e5c6032836148cc565b9150613e6782614d51565b604082019050919050565b6000613e7f6026836148cc565b9150613e8a82614da0565b604082019050919050565b6000613ea2601c836148cc565b9150613ead82614def565b602082019050919050565b6000613ec5601c836148cc565b9150613ed082614e18565b602082019050919050565b6000613ee86024836148cc565b9150613ef382614e41565b604082019050919050565b6000613f0b6019836148cc565b9150613f1682614e90565b602082019050919050565b6000613f2e6009836148cc565b9150613f3982614eb9565b602082019050919050565b6000613f51602c836148cc565b9150613f5c82614ee2565b604082019050919050565b6000613f746038836148cc565b9150613f7f82614f31565b604082019050919050565b6000613f97600e836148cc565b9150613fa282614f80565b602082019050919050565b6000613fba602a836148cc565b9150613fc582614fa9565b604082019050919050565b6000613fdd6029836148cc565b9150613fe882614ff8565b604082019050919050565b60006140006020836148cc565b915061400b82615047565b602082019050919050565b6000614023602c836148cc565b915061402e82615070565b604082019050919050565b60006140466005836148dd565b9150614051826150bf565b600582019050919050565b60006140696020836148cc565b9150614074826150e8565b602082019050919050565b600061408c6029836148cc565b915061409782615111565b604082019050919050565b60006140af6014836148cc565b91506140ba82615160565b602082019050919050565b60006140d26011836148cc565b91506140dd82615189565b602082019050919050565b60006140f56010836148cc565b9150614100826151b2565b602082019050919050565b60006141186021836148cc565b9150614123826151db565b604082019050919050565b600061413b600e836148cc565b91506141468261522a565b602082019050919050565b600061415e6010836148cc565b915061416982615253565b602082019050919050565b60006141816000836148c1565b915061418c8261527c565b600082019050919050565b60006141a46010836148cc565b91506141af8261527f565b602082019050919050565b60006141c76031836148cc565b91506141d2826152a8565b604082019050919050565b60006141ea601f836148cc565b91506141f5826152f7565b602082019050919050565b600061420d6008836148cc565b915061421882615320565b602082019050919050565b61422c81614a71565b82525050565b61423b81614a71565b82525050565b61424a81614a7b565b82525050565b600061425c8284613bbe565b60148201915081905092915050565b60006142778284613ca1565b915081905092915050565b600061428e8285613d8a565b915061429a8284613d59565b91506142a582614039565b91508190509392505050565b60006142bc82613e09565b91506142c88284613c51565b60208201915081905092915050565b60006142e282614174565b9150819050919050565b60006020820190506143016000830184613baf565b92915050565b600060808201905061431c6000830187613baf565b6143296020830186613baf565b6143366040830185614232565b81810360608301526143488184613c68565b905095945050505050565b6000602082019050818103600083015261436d8184613bd5565b905092915050565b600060208201905061438a6000830184613c33565b92915050565b60006080820190506143a56000830187613c42565b6143b26020830186614241565b6143bf6040830185613c42565b6143cc6060830184613c42565b95945050505050565b600060208201905081810360008301526143ef8184613d20565b905092915050565b6000602082019050818103600083015261441081613e2c565b9050919050565b6000602082019050818103600083015261443081613e4f565b9050919050565b6000602082019050818103600083015261445081613e72565b9050919050565b6000602082019050818103600083015261447081613e95565b9050919050565b6000602082019050818103600083015261449081613eb8565b9050919050565b600060208201905081810360008301526144b081613edb565b9050919050565b600060208201905081810360008301526144d081613efe565b9050919050565b600060208201905081810360008301526144f081613f21565b9050919050565b6000602082019050818103600083015261451081613f44565b9050919050565b6000602082019050818103600083015261453081613f67565b9050919050565b6000602082019050818103600083015261455081613f8a565b9050919050565b6000602082019050818103600083015261457081613fad565b9050919050565b6000602082019050818103600083015261459081613fd0565b9050919050565b600060208201905081810360008301526145b081613ff3565b9050919050565b600060208201905081810360008301526145d081614016565b9050919050565b600060208201905081810360008301526145f08161405c565b9050919050565b600060208201905081810360008301526146108161407f565b9050919050565b60006020820190508181036000830152614630816140a2565b9050919050565b60006020820190508181036000830152614650816140c5565b9050919050565b60006020820190508181036000830152614670816140e8565b9050919050565b600060208201905081810360008301526146908161410b565b9050919050565b600060208201905081810360008301526146b08161412e565b9050919050565b600060208201905081810360008301526146d081614151565b9050919050565b600060208201905081810360008301526146f081614197565b9050919050565b60006020820190508181036000830152614710816141ba565b9050919050565b60006020820190508181036000830152614730816141dd565b9050919050565b6000602082019050818103600083015261475081614200565b9050919050565b600060208201905061476c6000830184614232565b92915050565b60006060820190506147876000830186614232565b6147946020830185614232565b81810360408301526147a68184613d20565b9050949350505050565b60006147ba6147cb565b90506147c68282614afc565b919050565b6000604051905090565b600067ffffffffffffffff8211156147f0576147ef614c8c565b5b6147f982614cbb565b9050602081019050919050565b600067ffffffffffffffff82111561482157614820614c8c565b5b61482a82614cbb565b9050602081019050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006148f382614a71565b91506148fe83614a71565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561493357614932614bff565b5b828201905092915050565b600061494982614a71565b915061495483614a71565b92508261496457614963614c2e565b5b828204905092915050565b600061497a82614a71565b915061498583614a71565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156149be576149bd614bff565b5b828202905092915050565b60006149d482614a71565b91506149df83614a71565b9250828210156149f2576149f1614bff565b5b828203905092915050565b6000614a0882614a51565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015614ab5578082015181840152602081019050614a9a565b83811115614ac4576000848401525b50505050565b60006002820490506001821680614ae257607f821691505b60208210811415614af657614af5614c5d565b5b50919050565b614b0582614cbb565b810181811067ffffffffffffffff82111715614b2457614b23614c8c565b5b80604052505050565b6000614b3882614a71565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614b6b57614b6a614bff565b5b600182019050919050565b6000614b8182614a7b565b915060ff821415614b9557614b94614bff565b5b600182019050919050565b6000614bab82614bbc565b9050919050565b6000819050919050565b6000614bc782614ccc565b9050919050565b6000614bd982614a71565b9150614be483614a71565b925082614bf457614bf3614c2e565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f43616e6e6f74206465637265617365206d617820656c656d656e747300000000600082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4d6178206c696d69740000000000000000000000000000000000000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f456e64204944204f7665726c6170000000000000000000000000000000000000600082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b7f5075626c6963206e6f74206f70656e207965742e000000000000000000000000600082015250565b7f56616c75652062656c6f77207072696365000000000000000000000000000000600082015250565b7f50617573652069732064697361626c6500000000000000000000000000000000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f53616c6573206e6f74206f70656e000000000000000000000000000000000000600082015250565b7f5374617274204944204f7665726c617000000000000000000000000000000000600082015250565b50565b7f5472616e73666572206661696c65642e00000000000000000000000000000000600082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b7f536f6c646f757421000000000000000000000000000000000000000000000000600082015250565b615352816149fd565b811461535d57600080fd5b50565b61536981614a0f565b811461537457600080fd5b50565b61538081614a1b565b811461538b57600080fd5b50565b61539781614a25565b81146153a257600080fd5b50565b6153ae81614a71565b81146153b957600080fd5b50565b6153c581614a7b565b81146153d057600080fd5b5056fea26469706673582212202620214c48ce3db2954677b4c8fff4354c55cd624faa66cc85104c9655c1514564736f6c63430008040033
Verified Source Code Full Match
Compiler: v0.8.4+commit.c7e474f2
EVM: istanbul
Optimization: No
1_Storage.sol 2102 lines
/*** Part of the SimpDAO family ***/
/** Simping as a Service **/
/** Keep an eye out for SimpDAO.io for when SimpDAO goes live. **/
/**
IMPORTANT NOTICE:
This smart contract was written and deployed by the software engineers at
https://highstack.co in a contractor capacity.
Highstack is not responsible for any malicious use or losses arising from using
or interacting with this smart contract.
THIS CONTRACT IS PROVIDED ON AN “AS IS” BASIS. USE THIS SOFTWARE AT YOUR OWN RISK.
THERE IS NO WARRANTY, EXPRESSED OR IMPLIED, THAT DESCRIBED FUNCTIONALITY WILL
FUNCTION AS EXPECTED OR INTENDED. PRODUCT MAY CEASE TO EXIST. NOT AN INVESTMENT,
SECURITY OR A SWAP. TOKENS HAVE NO RIGHTS, USES, PURPOSE, ATTRIBUTES,
FUNCTIONALITIES OR FEATURES, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY
USES, PURPOSE OR ATTRIBUTES. TOKENS MAY HAVE NO VALUE. PRODUCT MAY CONTAIN BUGS AND
SERIOUS BREACHES IN THE SECURITY THAT MAY RESULT IN LOSS OF YOUR ASSETS OR THEIR
IMPLIED VALUE. ALL THE CRYPTOCURRENCY TRANSFERRED TO THIS SMART CONTRACT MAY BE LOST.
THE CONTRACT DEVLOPERS ARE NOT RESPONSIBLE FOR ANY MONETARY LOSS, PROFIT LOSS OR ANY
OTHER LOSSES DUE TO USE OF DESCRIBED PRODUCT. CHANGES COULD BE MADE BEFORE AND AFTER
THE RELEASE OF THE PRODUCT. NO PRIOR NOTICE MAY BE GIVEN. ALL TRANSACTION ON THE
BLOCKCHAIN ARE FINAL, NO REFUND, COMPENSATION OR REIMBURSEMENT POSSIBLE. YOU MAY
LOOSE ALL THE CRYPTOCURRENCY USED TO INTERACT WITH THIS CONTRACT. IT IS YOUR
RESPONSIBILITY TO REVIEW THE PROJECT, TEAM, TERMS & CONDITIONS BEFORE USING THE
PRODUCT.
**/
// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/security/ReentrancyGuard.sol
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
// File: @openzeppelin/contracts/utils/Counters.sol
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
// File: @openzeppelin/contracts/utils/math/SafeMath.sol
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
// File: @openzeppelin/contracts/utils/Strings.sol
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
// File: @openzeppelin/contracts/utils/cryptography/ECDSA.sol
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.0;
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
} else if (error == RecoverError.InvalidSignatureV) {
revert("ECDSA: invalid signature 'v' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
// Check the signature length
// - case 65: r,s,v signature (standard)
// - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else if (signature.length == 64) {
bytes32 r;
bytes32 vs;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
assembly {
r := mload(add(signature, 0x20))
vs := mload(add(signature, 0x40))
}
return tryRecover(hash, r, vs);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s;
uint8 v;
assembly {
s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
v := add(shr(255, vs), 27)
}
return tryRecover(hash, v, r, s);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
if (v != 27 && v != 28) {
return (address(0), RecoverError.InvalidSignatureV);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}
// File: @openzeppelin/contracts/utils/Address.sol
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
// File: @openzeppelin/contracts/utils/introspection/IERC165.sol
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
// File: @openzeppelin/contracts/utils/introspection/ERC165.sol
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
// File: @openzeppelin/contracts/token/ERC721/IERC721.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
// File: contracts/IERC721Enumerable.sol
pragma solidity ^0.8.0;
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
}
// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
// File: contracts/ERC721.sol
pragma solidity ^0.8.0;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev Edit for rawOwnerOf token
*/
function rawOwnerOf(uint256 tokenId) public view returns (address) {
return _owners[tokenId];
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeM...
// [truncated — 69787 bytes total]
Read Contract
MAX_ELEMENTS 0x3502a716 → uint256
PRICE 0x8d859f3e → uint256
balanceOf 0x70a08231 → uint256
baseTokenUris 0xe81f799d → uint256, uint256, string
getApproved 0x081812fc → address
getUnsoldTokens 0x967d61d9 → uint256[]
isApprovedForAll 0xe985e9c5 → bool
isValidAccessMessage 0x32624114 → bool
maxMint 0x7501f741 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
price 0x26a49e37 → uint256
rawOwnerOf 0x7f81be69 → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
walletOfOwner 0x438b6300 → uint256[]
Write Contract 19 functions
These functions modify contract state and require a wallet transaction to execute.
adminMint 0x0dc28efe
uint256 _amount
address receiver
approve 0x095ea7b3
address to
uint256 tokenId
clearBaseUris 0x6bd98660
No parameters
mint 0xa0712d68
uint256 _amount
mintUnsoldTokens 0x66474ff7
uint256 amount
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 0x48f3afed
string baseURI
uint256 startId
uint256 endId
setDevAddress 0xff310af9
address _devAddress
uint256 _devFee
setMaxElements 0x71f9f200
uint256 maxElements
setMaxMint 0x547520fe
uint256 limit
setMintPrice 0xf4a0a528
uint256 mintPriceWei
setPause 0xbedb86fb
bool _pause
setStartTimes 0x6d489935
uint256 _publicStart
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdrawAll 0x853828b6
No parameters
Recent Transactions
No transactions found for this address