Address Contract Verified
Address
0xB02FDEddE59aba04FF14062519e880B5E6BA316E
Balance
0 ETH
Nonce
1
Code Size
17341 bytes
Creator
0x3E43fc80...4a14 at tx 0xe842ac41...c3b6da
Indexed Transactions
0
Contract Bytecode
17341 bytes
0x608060405234801561001057600080fd5b50600436106101575760003560e01c8063715018a6116100c3578063b390c0ab1161007c578063b390c0ab14610398578063bd85b039146103b4578063e985e9c5146103e4578063f242432a14610414578063f2fde38b14610430578063f46eccc41461044c57610157565b8063715018a6146102fe578063782f08ae146103085780638da5cb5b1461032457806395d89b4114610342578063a22cb46514610360578063a3c1d3191461037c57610157565b806320ec271b1161011557806320ec271b14610242578063210067871461025e5780632eb2c2d61461027a57806338b16de8146102965780634055567e146102b25780634e1273f4146102ce57610157565b8062fdd58e1461015c57806301ffc9a71461018c57806306fdde03146101bc5780630ca83480146101da5780630e89341c146101f6578063156e29f614610226575b600080fd5b6101766004803603810190610171919061326c565b61047c565b6040516101839190613c81565b60405180910390f35b6101a660048036038101906101a191906134c6565b6104a1565b6040516101b39190613a9e565b60405180910390f35b6101c4610533565b6040516101d19190613add565b60405180910390f35b6101f460048036038101906101ef9190613197565b6105c1565b005b610210600480360381019061020b9190613520565b61078c565b60405161021d9190613add565b60405180910390f35b610240600480360381019061023b91906132ac565b610891565b005b61025c60048036038101906102579190613445565b61099d565b005b61027860048036038101906102739190613377565b610b8f565b005b610294600480360381019061028f9190613031565b610d13565b005b6102b060048036038101906102ab9190613520565b611175565b005b6102cc60048036038101906102c791906133c4565b611294565b005b6102e860048036038101906102e391906132ff565b6114a9565b6040516102f59190613a45565b60405180910390f35b610306611603565b005b610322600480360381019061031d919061354d565b61168b565b005b61032c611855565b604051610339919061393f565b60405180910390f35b61034a61187f565b6040516103579190613add565b60405180910390f35b61037a6004803603810190610375919061322c565b61190d565b005b6103966004803603810190610391919061322c565b611a0a565b005b6103b260048036038101906103ad91906135ad565b611b1a565b005b6103ce60048036038101906103c99190613520565b611c1b565b6040516103db9190613c81565b60405180910390f35b6103fe60048036038101906103f99190612ff1565b611c38565b60405161040b9190613a9e565b60405180910390f35b61042e60048036038101906104299190613100565b611c67565b005b61044a60048036038101906104459190612fc4565b612026565b005b61046660048036038101906104619190612fc4565b61211e565b6040516104739190613a9e565b60405180910390f35b6000602052816000526040600020602052806000526040600020600091509150505481565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104fc575063d9b67a2660e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061052c5750630e89341c60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6003805461054090613f9c565b80601f016020809104026020016040519081016040528092919081815260200182805461056c90613f9c565b80156105b95780601f1061058e576101008083540402835291602001916105b9565b820191906000526020600020905b81548152906001019060200180831161059c57829003601f168201915b505050505081565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661064d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064490613c21565b60405180910390fd5b60005b848490508110156106e75760076000868684818110610672576106716140a6565b5b90506020020135815260200190815260200160002060009054906101000a900460ff166106d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106cb90613b81565b60405180910390fd5b80806106df90613fff565b915050610650565b5061078585858580806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506040518060200160405280600081525061213e565b5050505050565b60606007600083815260200190815260200160002060009054906101000a900460ff166107ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e590613b21565b60405180910390fd5b60056000838152602001908152602001600020805461080c90613f9c565b80601f016020809104026020016040519081016040528092919081815260200182805461083890613f9c565b80156108855780601f1061085a57610100808354040283529160200191610885565b820191906000526020600020905b81548152906001019060200180831161086857829003601f168201915b50505050509050919050565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661091d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091490613c21565b60405180910390fd5b6007600083815260200190815260200160002060009054906101000a900460ff1661097d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097490613b81565b60405180910390fd5b610998838383604051806020016040528060008152506121ce565b505050565b60005b84849050811015610afb57600760008686848181106109c2576109c16140a6565b5b90506020020135815260200190815260200160002060009054906101000a900460ff16610a24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1b90613b81565b60405180910390fd5b828282818110610a3757610a366140a6565b5b905060200201356000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878785818110610a9157610a906140a6565b5b905060200201358152602001908152602001600020541015610ae8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610adf90613be1565b60405180910390fd5b8080610af390613fff565b9150506109a0565b50610b8933858580806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061220a565b50505050565b610b97612298565b73ffffffffffffffffffffffffffffffffffffffff16610bb5611855565b73ffffffffffffffffffffffffffffffffffffffff1614610c0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0290613bc1565b60405180910390fd5b60005b82829050811015610d0e576000838383818110610c2e57610c2d6140a6565b5b9050602002013590506007600082815260200190815260200160002060009054906101000a900460ff16610c97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8e90613b81565b60405180910390fd5b60016008600083815260200190815260200160002060006101000a81548160ff0219169083151502179055507ff6745a2db3ab942587bd3204ce8dd5f4cec119b9495758e1c39591eca58fe47181604051610cf29190613c81565b60405180910390a1508080610d0690613fff565b915050610c0e565b505050565b60008351905082518114610d5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5390613c01565b60405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610e1c5750600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610e5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5290613c61565b60405180910390fd5b60005b81811015610f7f576000858281518110610e7b57610e7a6140a6565b5b602002602001015190506000858381518110610e9a57610e996140a6565b5b60200260200101519050806000808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000206000828254610f039190613eb2565b92505081905550806000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000206000828254610f699190613e5c565b9250508190555082806001019350505050610e5e565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610ff6929190613a67565b60405180910390a460008573ffffffffffffffffffffffffffffffffffffffff163b146110fc5763bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168573ffffffffffffffffffffffffffffffffffffffff1663bc197c8133898888886040518663ffffffff1660e01b815260040161108595949392919061395a565b602060405180830381600087803b15801561109f57600080fd5b505af11580156110b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d791906134f3565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461112e565b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b61116d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116490613ba1565b60405180910390fd5b505050505050565b61117d612298565b73ffffffffffffffffffffffffffffffffffffffff1661119b611855565b73ffffffffffffffffffffffffffffffffffffffff16146111f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e890613bc1565b60405180910390fd5b6007600082815260200190815260200160002060009054906101000a900460ff1661121b57600080fd5b60016009600083815260200190815260200160002060006101000a81548160ff021916908315150217905550807fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b55657207600560008481526020019081526020016000206040516112899190613aff565b60405180910390a250565b61129c612298565b73ffffffffffffffffffffffffffffffffffffffff166112ba611855565b73ffffffffffffffffffffffffffffffffffffffff1614611310576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130790613bc1565b60405180910390fd5b818190508484905014611358576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134f90613c01565b60405180910390fd5b60005b848490508110156114a257600085858381811061137b5761137a6140a6565b5b9050602002013590506007600082815260200190815260200160002060009054906101000a900460ff16156113e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113dc90613b61565b60405180910390fd5b60016007600083815260200190815260200160002060006101000a81548160ff021916908315150217905550838383818110611424576114236140a6565b5b90506020028101906114369190613cc5565b600560008481526020019081526020016000209190611456929190612b84565b507f90f1f758f0e2b40929b1fd48df7ebe10afc272a362e1f0d63a90b8b4715d799f816040516114869190613c81565b60405180910390a150808061149a90613fff565b91505061135b565b5050505050565b6060600083519050825181146114f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114eb90613c01565b60405180910390fd5b835167ffffffffffffffff81111561150f5761150e6140d5565b5b60405190808252806020026020018201604052801561153d5781602001602082028036833780820191505090505b50915060005b818110156115fb57600080868381518110611561576115606140a6565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008583815181106115b8576115b76140a6565b5b60200260200101518152602001908152602001600020548382815181106115e2576115e16140a6565b5b6020026020010181815250508080600101915050611543565b505092915050565b61160b612298565b73ffffffffffffffffffffffffffffffffffffffff16611629611855565b73ffffffffffffffffffffffffffffffffffffffff161461167f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167690613bc1565b60405180910390fd5b61168960006122a0565b565b611693612298565b73ffffffffffffffffffffffffffffffffffffffff166116b1611855565b73ffffffffffffffffffffffffffffffffffffffff1614611707576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116fe90613bc1565b60405180910390fd5b6009600084815260200190815260200160002060009054906101000a900460ff1615611768576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161175f90613c41565b60405180910390fd5b6007600084815260200190815260200160002060009054906101000a900460ff166117c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117bf90613b81565b60405180910390fd5b6118168383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612366565b827f5ed12364f8ee3649ef6882db8454c6888fda2f7ad169d6d9c3e037450cb2572d8383604051611848929190613ab9565b60405180910390a2505050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6004805461188c90613f9c565b80601f01602080910402602001604051908101604052809291908181526020018280546118b890613f9c565b80156119055780601f106118da57610100808354040283529160200191611905565b820191906000526020600020905b8154815290600101906020018083116118e857829003601f168201915b505050505081565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516119fe9190613a9e565b60405180910390a35050565b611a12612298565b73ffffffffffffffffffffffffffffffffffffffff16611a30611855565b73ffffffffffffffffffffffffffffffffffffffff1614611a86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7d90613bc1565b60405180910390fd5b80600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f1f96bc657d385fd83da973a43f2ad969e6d96b6779b779571a7306db7ca1cd008282604051611b0e929190613a1c565b60405180910390a15050565b6007600083815260200190815260200160002060009054906101000a900460ff16611b7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7190613b81565b60405180910390fd5b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000848152602001908152602001600020541015611c0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c0390613be1565b60405180910390fd5b611c17338383612392565b5050565b6000600a6000838152602001908152602001600020549050919050565b60016020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611d275750600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611d66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5d90613c61565b60405180910390fd5b816000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008581526020019081526020016000206000828254611dc59190613eb2565b92505081905550816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008581526020019081526020016000206000828254611e2b9190613e5c565b925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628686604051611ea8929190613c9c565b60405180910390a460008473ffffffffffffffffffffffffffffffffffffffff163b14611fae5763f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168473ffffffffffffffffffffffffffffffffffffffff1663f23a6e6133888787876040518663ffffffff1660e01b8152600401611f379594939291906139c2565b602060405180830381600087803b158015611f5157600080fd5b505af1158015611f65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8991906134f3565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611fe0565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b61201f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161201690613ba1565b60405180910390fd5b5050505050565b61202e612298565b73ffffffffffffffffffffffffffffffffffffffff1661204c611855565b73ffffffffffffffffffffffffffffffffffffffff16146120a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161209990613bc1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161210990613b41565b60405180910390fd5b61211b816122a0565b50565b60066020528060005260406000206000915054906101000a900460ff1681565b61214a848484846123cc565b60005b83518110156121c757828181518110612169576121686140a6565b5b6020026020010151600a6000868481518110612188576121876140a6565b5b6020026020010151815260200190815260200160002060008282546121ad9190613e5c565b9250508190555080806121bf90613fff565b91505061214d565b5050505050565b6121da848484846126be565b81600a600085815260200190815260200160002060008282546121fd9190613e5c565b9250508190555050505050565b612215838383612919565b60005b825181101561229257818181518110612234576122336140a6565b5b6020026020010151600a6000858481518110612253576122526140a6565b5b6020026020010151815260200190815260200160002060008282546122789190613eb2565b92505081905550808061228a90613fff565b915050612218565b50505050565b600033905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8060056000848152602001908152602001600020908051906020019061238d929190612c0a565b505050565b61239d838383612a9a565b80600a600084815260200190815260200160002060008282546123c09190613eb2565b92505081905550505050565b60008351905082518114612415576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240c90613c01565b60405180910390fd5b60005b818110156124c757838181518110612433576124326140a6565b5b60200260200101516000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600087848151811061248e5761248d6140a6565b5b6020026020010151815260200190815260200160002060008282546124b39190613e5c565b925050819055508080600101915050612418565b508473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161253f929190613a67565b60405180910390a460008573ffffffffffffffffffffffffffffffffffffffff163b146126465763bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168573ffffffffffffffffffffffffffffffffffffffff1663bc197c813360008888886040518663ffffffff1660e01b81526004016125cf95949392919061395a565b602060405180830381600087803b1580156125e957600080fd5b505af11580156125fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061262191906134f3565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612678565b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b6126b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126ae90613ba1565b60405180910390fd5b5050505050565b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000858152602001908152602001600020600082825461271d9190613e5c565b925050819055508373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62868660405161279b929190613c9c565b60405180910390a460008473ffffffffffffffffffffffffffffffffffffffff163b146128a25763f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168473ffffffffffffffffffffffffffffffffffffffff1663f23a6e613360008787876040518663ffffffff1660e01b815260040161282b9594939291906139c2565b602060405180830381600087803b15801561284557600080fd5b505af1158015612859573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061287d91906134f3565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146128d4565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b612913576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161290a90613ba1565b60405180910390fd5b50505050565b60008251905081518114612962576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161295990613c01565b60405180910390fd5b60005b81811015612a14578281815181106129805761297f6140a6565b5b60200260200101516000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008684815181106129db576129da6140a6565b5b602002602001015181526020019081526020016000206000828254612a009190613eb2565b925050819055508080600101915050612965565b50600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612a8c929190613a67565b60405180910390a450505050565b806000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000206000828254612af99190613eb2565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051612b77929190613c9c565b60405180910390a4505050565b828054612b9090613f9c565b90600052602060002090601f016020900481019282612bb25760008555612bf9565b82601f10612bcb57803560ff1916838001178555612bf9565b82800160010185558215612bf9579182015b82811115612bf8578235825591602001919060010190612bdd565b5b509050612c069190612c90565b5090565b828054612c1690613f9c565b90600052602060002090601f016020900481019282612c385760008555612c7f565b82601f10612c5157805160ff1916838001178555612c7f565b82800160010185558215612c7f579182015b82811115612c7e578251825591602001919060010190612c63565b5b509050612c8c9190612c90565b5090565b5b80821115612ca9576000816000905550600101612c91565b5090565b6000612cc0612cbb84613d4d565b613d28565b90508083825260208201905082856020860282011115612ce357612ce2614118565b5b60005b85811015612d135781612cf98882612dcf565b845260208401935060208301925050600181019050612ce6565b5050509392505050565b6000612d30612d2b84613d79565b613d28565b90508083825260208201905082856020860282011115612d5357612d52614118565b5b60005b85811015612d835781612d698882612faf565b845260208401935060208301925050600181019050612d56565b5050509392505050565b6000612da0612d9b84613da5565b613d28565b905082815260208101848484011115612dbc57612dbb614122565b5b612dc7848285613f5a565b509392505050565b600081359050612dde8161432b565b92915050565b600082601f830112612df957612df8614109565b5b8135612e09848260208601612cad565b91505092915050565b60008083601f840112612e2857612e27614109565b5b8235905067ffffffffffffffff811115612e4557612e44614104565b5b602083019150836020820283011115612e6157612e60614118565b5b9250929050565b60008083601f840112612e7e57612e7d614109565b5b8235905067ffffffffffffffff811115612e9b57612e9a614104565b5b602083019150836020820283011115612eb757612eb6614118565b5b9250929050565b600082601f830112612ed357612ed2614109565b5b8135612ee3848260208601612d1d565b91505092915050565b600081359050612efb81614342565b92915050565b600081359050612f1081614359565b92915050565b600081519050612f2581614359565b92915050565b600082601f830112612f4057612f3f614109565b5b8135612f50848260208601612d8d565b91505092915050565b60008083601f840112612f6f57612f6e614109565b5b8235905067ffffffffffffffff811115612f8c57612f8b614104565b5b602083019150836001820283011115612fa857612fa7614118565b5b9250929050565b600081359050612fbe81614370565b92915050565b600060208284031215612fda57612fd961412c565b5b6000612fe884828501612dcf565b91505092915050565b600080604083850312156130085761300761412c565b5b600061301685828601612dcf565b925050602061302785828601612dcf565b9150509250929050565b600080600080600060a0868803121561304d5761304c61412c565b5b600061305b88828901612dcf565b955050602061306c88828901612dcf565b945050604086013567ffffffffffffffff81111561308d5761308c614127565b5b61309988828901612ebe565b935050606086013567ffffffffffffffff8111156130ba576130b9614127565b5b6130c688828901612ebe565b925050608086013567ffffffffffffffff8111156130e7576130e6614127565b5b6130f388828901612f2b565b9150509295509295909350565b600080600080600060a0868803121561311c5761311b61412c565b5b600061312a88828901612dcf565b955050602061313b88828901612dcf565b945050604061314c88828901612faf565b935050606061315d88828901612faf565b925050608086013567ffffffffffffffff81111561317e5761317d614127565b5b61318a88828901612f2b565b9150509295509295909350565b6000806000806000606086880312156131b3576131b261412c565b5b60006131c188828901612dcf565b955050602086013567ffffffffffffffff8111156131e2576131e1614127565b5b6131ee88828901612e68565b9450945050604086013567ffffffffffffffff81111561321157613210614127565b5b61321d88828901612e68565b92509250509295509295909350565b600080604083850312156132435761324261412c565b5b600061325185828601612dcf565b925050602061326285828601612eec565b9150509250929050565b600080604083850312156132835761328261412c565b5b600061329185828601612dcf565b92505060206132a285828601612faf565b9150509250929050565b6000806000606084860312156132c5576132c461412c565b5b60006132d386828701612dcf565b93505060206132e486828701612faf565b92505060406132f586828701612faf565b9150509250925092565b600080604083850312156133165761331561412c565b5b600083013567ffffffffffffffff81111561333457613333614127565b5b61334085828601612de4565b925050602083013567ffffffffffffffff81111561336157613360614127565b5b61336d85828601612ebe565b9150509250929050565b6000806020838503121561338e5761338d61412c565b5b600083013567ffffffffffffffff8111156133ac576133ab614127565b5b6133b885828601612e68565b92509250509250929050565b600080600080604085870312156133de576133dd61412c565b5b600085013567ffffffffffffffff8111156133fc576133fb614127565b5b61340887828801612e68565b9450945050602085013567ffffffffffffffff81111561342b5761342a614127565b5b61343787828801612e12565b925092505092959194509250565b6000806000806040858703121561345f5761345e61412c565b5b600085013567ffffffffffffffff81111561347d5761347c614127565b5b61348987828801612e68565b9450945050602085013567ffffffffffffffff8111156134ac576134ab614127565b5b6134b887828801612e68565b925092505092959194509250565b6000602082840312156134dc576134db61412c565b5b60006134ea84828501612f01565b91505092915050565b6000602082840312156135095761350861412c565b5b600061351784828501612f16565b91505092915050565b6000602082840312156135365761353561412c565b5b600061354484828501612faf565b91505092915050565b6000806000604084860312156135665761356561412c565b5b600061357486828701612faf565b935050602084013567ffffffffffffffff81111561359557613594614127565b5b6135a186828701612f59565b92509250509250925092565b600080604083850312156135c4576135c361412c565b5b60006135d285828601612faf565b92505060206135e385828601612faf565b9150509250929050565b60006135f98383613921565b60208301905092915050565b61360e81613ee6565b82525050565b600061361f82613dfb565b6136298185613e29565b935061363483613dd6565b8060005b8381101561366557815161364c88826135ed565b975061365783613e1c565b925050600181019050613638565b5085935050505092915050565b61367b81613ef8565b82525050565b600061368c82613e06565b6136968185613e3a565b93506136a6818560208601613f69565b6136af81614131565b840191505092915050565b60006136c68385613e4b565b93506136d3838584613f5a565b6136dc83614131565b840190509392505050565b60006136f282613e11565b6136fc8185613e4b565b935061370c818560208601613f69565b61371581614131565b840191505092915050565b6000815461372d81613f9c565b6137378186613e4b565b94506001821660008114613752576001811461376457613797565b60ff1983168652602086019350613797565b61376d85613de6565b60005b8381101561378f57815481890152600182019150602081019050613770565b808801955050505b50505092915050565b60006137ad601f83613e4b565b91506137b882614142565b602082019050919050565b60006137d0602683613e4b565b91506137db8261416b565b604082019050919050565b60006137f3601183613e4b565b91506137fe826141ba565b602082019050919050565b6000613816601183613e4b565b9150613821826141e3565b602082019050919050565b6000613839601083613e4b565b91506138448261420c565b602082019050919050565b600061385c602083613e4b565b915061386782614235565b602082019050919050565b600061387f601b83613e4b565b915061388a8261425e565b602082019050919050565b60006138a2600f83613e4b565b91506138ad82614287565b602082019050919050565b60006138c5600c83613e4b565b91506138d0826142b0565b602082019050919050565b60006138e8601383613e4b565b91506138f3826142d9565b602082019050919050565b600061390b600e83613e4b565b915061391682614302565b602082019050919050565b61392a81613f50565b82525050565b61393981613f50565b82525050565b60006020820190506139546000830184613605565b92915050565b600060a08201905061396f6000830188613605565b61397c6020830187613605565b818103604083015261398e8186613614565b905081810360608301526139a28185613614565b905081810360808301526139b68184613681565b90509695505050505050565b600060a0820190506139d76000830188613605565b6139e46020830187613605565b6139f16040830186613930565b6139fe6060830185613930565b8181036080830152613a108184613681565b90509695505050505050565b6000604082019050613a316000830185613605565b613a3e6020830184613672565b9392505050565b60006020820190508181036000830152613a5f8184613614565b905092915050565b60006040820190508181036000830152613a818185613614565b90508181036020830152613a958184613614565b90509392505050565b6000602082019050613ab36000830184613672565b92915050565b60006020820190508181036000830152613ad48184866136ba565b90509392505050565b60006020820190508181036000830152613af781846136e7565b905092915050565b60006020820190508181036000830152613b198184613720565b905092915050565b60006020820190508181036000830152613b3a816137a0565b9050919050565b60006020820190508181036000830152613b5a816137c3565b9050919050565b60006020820190508181036000830152613b7a816137e6565b9050919050565b60006020820190508181036000830152613b9a81613809565b9050919050565b60006020820190508181036000830152613bba8161382c565b9050919050565b60006020820190508181036000830152613bda8161384f565b9050919050565b60006020820190508181036000830152613bfa81613872565b9050919050565b60006020820190508181036000830152613c1a81613895565b9050919050565b60006020820190508181036000830152613c3a816138b8565b9050919050565b60006020820190508181036000830152613c5a816138db565b9050919050565b60006020820190508181036000830152613c7a816138fe565b9050919050565b6000602082019050613c966000830184613930565b92915050565b6000604082019050613cb16000830185613930565b613cbe6020830184613930565b9392505050565b60008083356001602003843603038112613ce257613ce1614113565b5b80840192508235915067ffffffffffffffff821115613d0457613d0361410e565b5b602083019250600182023603831315613d2057613d1f61411d565b5b509250929050565b6000613d32613d43565b9050613d3e8282613fce565b919050565b6000604051905090565b600067ffffffffffffffff821115613d6857613d676140d5565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613d9457613d936140d5565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613dc057613dbf6140d5565b5b613dc982614131565b9050602081019050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613e6782613f50565b9150613e7283613f50565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613ea757613ea6614048565b5b828201905092915050565b6000613ebd82613f50565b9150613ec883613f50565b925082821015613edb57613eda614048565b5b828203905092915050565b6000613ef182613f30565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015613f87578082015181840152602081019050613f6c565b83811115613f96576000848401525b50505050565b60006002820490506001821680613fb457607f821691505b60208210811415613fc857613fc7614077565b5b50919050565b613fd782614131565b810181811067ffffffffffffffff82111715613ff657613ff56140d5565b5b80604052505050565b600061400a82613f50565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561403d5761403c614048565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e00600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f494420616c726561647920657869737473000000000000000000000000000000600082015250565b7f494420646f6573206e6f74206578697374000000000000000000000000000000600082015250565b7f554e534146455f524543495049454e5400000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f6275726e20616d6f756e7420657863656564732062616c616e63650000000000600082015250565b7f4c454e4754485f4d49534d415443480000000000000000000000000000000000600082015250565b7f4e6f742061206d696e7465720000000000000000000000000000000000000000600082015250565b7f54686973205552492069732066726f7a656e2100000000000000000000000000600082015250565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b61433481613ee6565b811461433f57600080fd5b50565b61434b81613ef8565b811461435657600080fd5b50565b61436281613f04565b811461436d57600080fd5b50565b61437981613f50565b811461438457600080fd5b5056fea26469706673582212208ef003c333e4162a7ca3149bea78ba683874c846f6a0eb91e0207547a67ed74e64736f6c63430008070033
Verified Source Code Full Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: No
InterleaveTokens.sol 459 lines
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";
/// @notice A generic interface for a contract which properly accepts ERC1155 tokens.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol)
interface ERC1155TokenReceiver {
function onERC1155Received(
address operator,
address from,
uint256 id,
uint256 amount,
bytes calldata data
) external returns (bytes4);
function onERC1155BatchReceived(
address operator,
address from,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external returns (bytes4);
}
/// @notice Minimalist and gas efficient standard ERC1155 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol)
abstract contract ERC1155 {
/*///////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event TransferSingle(
address indexed operator,
address indexed from,
address indexed to,
uint256 id,
uint256 amount
);
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] amounts
);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
event URI(string value, uint256 indexed id);
/*///////////////////////////////////////////////////////////////
ERC1155 STORAGE
//////////////////////////////////////////////////////////////*/
mapping(address => mapping(uint256 => uint256)) public balanceOf;
mapping(address => mapping(address => bool)) public isApprovedForAll;
/*///////////////////////////////////////////////////////////////
METADATA LOGIC
//////////////////////////////////////////////////////////////*/
function uri(uint256 id) public view virtual returns (string memory);
/*///////////////////////////////////////////////////////////////
ERC1155 LOGIC
//////////////////////////////////////////////////////////////*/
function setApprovalForAll(address operator, bool approved) public virtual {
isApprovedForAll[msg.sender][operator] = approved;
emit ApprovalForAll(msg.sender, operator, approved);
}
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) public virtual {
require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED");
balanceOf[from][id] -= amount;
balanceOf[to][id] += amount;
emit TransferSingle(msg.sender, from, to, id, amount);
require(
to.code.length == 0
? to != address(0)
: ERC1155TokenReceiver(to).onERC1155Received(msg.sender, from, id, amount, data) ==
ERC1155TokenReceiver.onERC1155Received.selector,
"UNSAFE_RECIPIENT"
);
}
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual {
uint256 idsLength = ids.length; // Saves MLOADs.
require(idsLength == amounts.length, "LENGTH_MISMATCH");
require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED");
for (uint256 i = 0; i < idsLength; ) {
uint256 id = ids[i];
uint256 amount = amounts[i];
balanceOf[from][id] -= amount;
balanceOf[to][id] += amount;
// An array can't have a total length
// larger than the max uint256 value.
unchecked {
i++;
}
}
emit TransferBatch(msg.sender, from, to, ids, amounts);
require(
to.code.length == 0
? to != address(0)
: ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, from, ids, amounts, data) ==
ERC1155TokenReceiver.onERC1155BatchReceived.selector,
"UNSAFE_RECIPIENT"
);
}
function balanceOfBatch(address[] memory owners, uint256[] memory ids)
public
view
virtual
returns (uint256[] memory balances)
{
uint256 ownersLength = owners.length; // Saves MLOADs.
require(ownersLength == ids.length, "LENGTH_MISMATCH");
balances = new uint256[](owners.length);
// Unchecked because the only math done is incrementing
// the array index counter which cannot possibly overflow.
unchecked {
for (uint256 i = 0; i < ownersLength; i++) {
balances[i] = balanceOf[owners[i]][ids[i]];
}
}
}
/*///////////////////////////////////////////////////////////////
ERC165 LOGIC
//////////////////////////////////////////////////////////////*/
function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) {
return
interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155
interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI
}
/*///////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function _mint(
address to,
uint256 id,
uint256 amount,
bytes memory data
) internal virtual {
balanceOf[to][id] += amount;
emit TransferSingle(msg.sender, address(0), to, id, amount);
require(
to.code.length == 0
? to != address(0)
: ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), id, amount, data) ==
ERC1155TokenReceiver.onERC1155Received.selector,
"UNSAFE_RECIPIENT"
);
}
function _batchMint(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
uint256 idsLength = ids.length; // Saves MLOADs.
require(idsLength == amounts.length, "LENGTH_MISMATCH");
for (uint256 i = 0; i < idsLength; ) {
balanceOf[to][ids[i]] += amounts[i];
// An array can't have a total length
// larger than the max uint256 value.
unchecked {
i++;
}
}
emit TransferBatch(msg.sender, address(0), to, ids, amounts);
require(
to.code.length == 0
? to != address(0)
: ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, address(0), ids, amounts, data) ==
ERC1155TokenReceiver.onERC1155BatchReceived.selector,
"UNSAFE_RECIPIENT"
);
}
function _batchBurn(
address from,
uint256[] memory ids,
uint256[] memory amounts
) internal virtual {
uint256 idsLength = ids.length; // Saves MLOADs.
require(idsLength == amounts.length, "LENGTH_MISMATCH");
for (uint256 i = 0; i < idsLength; ) {
balanceOf[from][ids[i]] -= amounts[i];
// An array can't have a total length
// larger than the max uint256 value.
unchecked {
i++;
}
}
emit TransferBatch(msg.sender, from, address(0), ids, amounts);
}
function _burn(
address from,
uint256 id,
uint256 amount
) internal virtual {
balanceOf[from][id] -= amount;
emit TransferSingle(msg.sender, from, address(0), id, amount);
}
}
contract Interleave is ERC1155, Ownable {
// NFT name
string public name;
// NFT symbol
string public symbol;
// NFT uri per ID
mapping(uint256 => string) private _uri;
// Addresses that can mint new NFTs
mapping(address => bool) public minters;
// Mapping from token ID to token existence
mapping(uint256 => bool) private exists;
// Mapping from token ID to boolean indicating if minting for that ID has been stopped
mapping(uint256 => bool) private unmintable;
// Mapping from token ID to boolean indicating if uri is frozen
mapping(uint256 => bool) private uriFrozen;
// Mapping from token ID to token supply
mapping(uint256 => uint256) private tokenSupply;
// Emitted when allowances of a minter is changed
event SetMinter(address minter, bool enabled);
// Emitted when a new NFT type is added
event Add(uint256 id);
// Emitted when minting of a NFT is stopped
event MintingStopped(uint256 id);
// Emitted when the URI of an ID is updated
event updateUri(string uri, uint256 indexed id);
// Emitted when the URI of an ID is frozen
event PermanentURI(string uri, uint256 indexed id);
constructor(
string memory _name,
string memory _symbol
//string memory _baseUri
) ERC1155() {
name = _name;
symbol = _symbol;
//_setURI(_baseUri);
}
function setMinterAccess(address minter, bool enabled) public onlyOwner {
minters[minter] = enabled;
emit SetMinter(minter, enabled);
}
function mint(address to, uint256 id, uint256 amount) external {
require(minters[msg.sender], "Not a minter");
require(exists[id], "ID does not exist");
_mint(to, id, amount, "");
}
/**
* @dev Internal override function for minting an NFT including totalSupply update
*/
function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal override {
super._mint(to, id, amount, data);
tokenSupply[id] += amount;
}
function batchMint(address to, uint256[] calldata ids, uint256[] calldata amounts) external {
require(minters[msg.sender], "Not a minter");
for (uint256 i = 0; i < ids.length; i++) {
require(exists[ids[i]], "ID does not exist");
}
_batchMint(to, ids, amounts, "");
}
/**
* @dev Internal override function for batch minting an NFT including totalSupply update
*/
function _batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal override {
super._batchMint(to, ids, amounts, data);
for (uint256 i = 0; i < ids.length; i++) {
tokenSupply[ids[i]] += amounts[i];
}
}
function burn(uint256 id, uint256 amount) external {
require(exists[id], "ID does not exist");
require(balanceOf[msg.sender][id] >= amount, "burn amount exceeds balance");
_burn(msg.sender, id, amount);
}
/**
* @dev Internal override function for minting an NFT including totalSupply update
*/
function _burn(address from, uint256 id, uint256 amount) internal override {
super._burn(from, id, amount);
tokenSupply[id] -= amount;
}
function batchBurn(uint256[] calldata ids, uint256[] calldata amounts) external {
for (uint256 i = 0; i < ids.length; i++) {
require(exists[ids[i]], "ID does not exist");
require(balanceOf[msg.sender][ids[i]] >= amounts[i], "burn amount exceeds balance");
}
_batchBurn(msg.sender, ids, amounts);
}
/**
* @dev Internal override function for batch minting an NFT including totalSupply update
*/
function _batchBurn(address from, uint256[] memory ids, uint256[] memory amounts) internal override {
super._batchBurn(from, ids, amounts);
for (uint256 i = 0; i < ids.length; i++) {
tokenSupply[ids[i]] -= amounts[i];
}
}
/**
* @dev Adds new collection IDs with their corresponding URI
*/
function add(uint256[] calldata ids, string[] calldata uris) external onlyOwner {
require(ids.length == uris.length, "LENGTH_MISMATCH");
for (uint256 i = 0; i < ids.length; i++) {
uint256 newId = ids[i];
require(!exists[newId], "ID already exists");
exists[newId] = true;
_uri[newId] = uris[i];
emit Add(newId);
}
}
function stopMinting(uint256[] calldata ids) external onlyOwner {
for (uint256 i = 0; i < ids.length; i++) {
uint256 id = ids[i];
require(exists[id], "ID does not exist");
unmintable[id] = true;
emit MintingStopped(id);
}
}
function _setUri(uint256 id, string memory newUri) internal virtual {
_uri[id] = newUri;
}
/**
* @dev Function to set the URI for all NFT IDs
*/
function setUri(uint256 id, string calldata newUri) external onlyOwner {
require(!uriFrozen[id], 'This URI is frozen!');
require(exists[id], "ID does not exist");
_setUri(id, newUri);
emit updateUri(newUri, id);
}
/**
* @dev Returns the URI of a token given its ID
* @param id ID of the token to query
* @return uri of the token or an empty string if it does not exist
*/
function uri(uint256 id) public view override returns (string memory) {
require(exists[id], "URI query for nonexistent token");
return _uri[id];
}
/**
* @dev Freezes the metadata for a collection
* @param id ID of the token collection
*/
function freezeUri(uint256 id) public onlyOwner {
require(exists[id]);
uriFrozen[id] = true;
emit PermanentURI(_uri[id], id);
}
/**
* @dev Returns the total quantity for a token ID
* @param id ID of the token to query
* @return amount of token in existence
*/
function totalSupply(uint256 id) external view returns (uint256) {
return tokenSupply[id];
}
}
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 67 lines
// SPDX-License-Identifier: MIT
// 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);
}
}
Ownable.sol 76 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_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);
}
}
Read Contract
balanceOf 0x00fdd58e → uint256
balanceOfBatch 0x4e1273f4 → uint256[]
isApprovedForAll 0xe985e9c5 → bool
minters 0xf46eccc4 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
totalSupply 0xbd85b039 → uint256
uri 0x0e89341c → string
Write Contract 14 functions
These functions modify contract state and require a wallet transaction to execute.
add 0x4055567e
uint256[] ids
string[] uris
batchBurn 0x20ec271b
uint256[] ids
uint256[] amounts
batchMint 0x0ca83480
address to
uint256[] ids
uint256[] amounts
burn 0xb390c0ab
uint256 id
uint256 amount
freezeUri 0x38b16de8
uint256 id
mint 0x156e29f6
address to
uint256 id
uint256 amount
renounceOwnership 0x715018a6
No parameters
safeBatchTransferFrom 0x2eb2c2d6
address from
address to
uint256[] ids
uint256[] amounts
bytes data
safeTransferFrom 0xf242432a
address from
address to
uint256 id
uint256 amount
bytes data
setApprovalForAll 0xa22cb465
address operator
bool approved
setMinterAccess 0xa3c1d319
address minter
bool enabled
setUri 0x782f08ae
uint256 id
string newUri
stopMinting 0x21006787
uint256[] ids
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address