Address Contract Partially Verified
Address
0x9C8D2F53F6Bff84458F1c84FDAa1e4852cA958E3
Balance
0 ETH
Nonce
1
Code Size
22887 bytes
Creator
0xB293c23E...BdD6 at tx 0xa3ad4b75...7a9d65
Indexed Transactions
0
Contract Bytecode
22887 bytes
0x6080604052600436106102885760003560e01c8063715018a61161015a578063b88d4fde116100c1578063da3ef23f1161007a578063da3ef23f146109b5578063e985e9c5146109de578063ec912c8314610a1b578063f2c4ce1e14610a46578063f2fde38b14610a6f578063fd9d2f4f14610a9857610288565b8063b88d4fde14610893578063ba1f879f146108bc578063ba582d73146108e7578063c668286214610910578063c87b56dd1461093b578063d936547e1461097857610288565b8063940cd05b11610113578063940cd05b146107a657806395d89b41146107cf5780639b6fbf8a146107fa5780639dfde20114610823578063a0712d681461084e578063a22cb4651461086a57610288565b8063715018a6146106cd57806377227139146106e45780638075fa471461070d5780638c851e5f146107295780638da5cb5b1461075257806391b7f5ed1461077d57610288565b806333bc1c5c116101fe57806355f804b3116101b757806355f804b3146105975780635c975abb146105c05780636352211e146105eb5780636ac7ca14146106285780636c0360eb1461066557806370a082311461069057610288565b806333bc1c5c146104945780633ccfd60b146104bf57806342842e0e146104c9578063438b6300146104f25780634f6ccce71461052f578063518302271461056c57610288565b8063095ea7b311610250578063095ea7b31461038657806318160ddd146103af57806323b872dd146103da5780632f745c591461040357806330cc7ae0146104405780633299c1201461046957610288565b806301ffc9a71461028d57806302329a29146102ca57806306fdde03146102f3578063081812fc1461031e578063081c8c441461035b575b600080fd5b34801561029957600080fd5b506102b460048036038101906102af9190613f76565b610ac1565b6040516102c19190614764565b60405180910390f35b3480156102d657600080fd5b506102f160048036038101906102ec9190613f49565b610b3b565b005b3480156102ff57600080fd5b50610308610bd4565b604051610315919061477f565b60405180910390f35b34801561032a57600080fd5b5061034560048036038101906103409190614019565b610c66565b604051610352919061469d565b60405180910390f35b34801561036757600080fd5b50610370610ceb565b60405161037d919061477f565b60405180910390f35b34801561039257600080fd5b506103ad60048036038101906103a89190613e77565b610d79565b005b3480156103bb57600080fd5b506103c4610e91565b6040516103d19190614b61565b60405180910390f35b3480156103e657600080fd5b5061040160048036038101906103fc9190613d61565b610e9e565b005b34801561040f57600080fd5b5061042a60048036038101906104259190613e77565b610efe565b6040516104379190614b61565b60405180910390f35b34801561044c57600080fd5b5061046760048036038101906104629190613cf4565b610fa3565b005b34801561047557600080fd5b5061047e61107a565b60405161048b9190614b61565b60405180910390f35b3480156104a057600080fd5b506104a9611080565b6040516104b69190614764565b60405180910390f35b6104c7611093565b005b3480156104d557600080fd5b506104f060048036038101906104eb9190613d61565b611207565b005b3480156104fe57600080fd5b5061051960048036038101906105149190613cf4565b611227565b6040516105269190614704565b60405180910390f35b34801561053b57600080fd5b5061055660048036038101906105519190614019565b6112d5565b6040516105639190614b61565b60405180910390f35b34801561057857600080fd5b50610581611346565b60405161058e9190614764565b60405180910390f35b3480156105a357600080fd5b506105be60048036038101906105b99190613fd0565b611359565b005b3480156105cc57600080fd5b506105d56113ef565b6040516105e29190614764565b60405180910390f35b3480156105f757600080fd5b50610612600480360381019061060d9190614019565b611402565b60405161061f919061469d565b60405180910390f35b34801561063457600080fd5b5061064f600480360381019061064a9190613cf4565b6114b4565b60405161065c9190614b61565b60405180910390f35b34801561067157600080fd5b5061067a6114cc565b604051610687919061477f565b60405180910390f35b34801561069c57600080fd5b506106b760048036038101906106b29190613cf4565b61155a565b6040516106c49190614b61565b60405180910390f35b3480156106d957600080fd5b506106e2611612565b005b3480156106f057600080fd5b5061070b60048036038101906107069190613f00565b61169a565b005b61072760048036038101906107229190614019565b611942565b005b34801561073557600080fd5b50610750600480360381019061074b9190613f49565b611b35565b005b34801561075e57600080fd5b50610767611bce565b604051610774919061469d565b60405180910390f35b34801561078957600080fd5b506107a4600480360381019061079f9190614019565b611bf8565b005b3480156107b257600080fd5b506107cd60048036038101906107c89190613f49565b611c7e565b005b3480156107db57600080fd5b506107e4611d17565b6040516107f1919061477f565b60405180910390f35b34801561080657600080fd5b50610821600480360381019061081c9190613eb7565b611da9565b005b34801561082f57600080fd5b50610838611eba565b6040516108459190614b61565b60405180910390f35b61086860048036038101906108639190614019565b611ec0565b005b34801561087657600080fd5b50610891600480360381019061088c9190613e37565b612118565b005b34801561089f57600080fd5b506108ba60048036038101906108b59190613db4565b61212e565b005b3480156108c857600080fd5b506108d1612190565b6040516108de9190614764565b60405180910390f35b3480156108f357600080fd5b5061090e60048036038101906109099190613f49565b6121a3565b005b34801561091c57600080fd5b5061092561223c565b604051610932919061477f565b60405180910390f35b34801561094757600080fd5b50610962600480360381019061095d9190614019565b6122ca565b60405161096f919061477f565b60405180910390f35b34801561098457600080fd5b5061099f600480360381019061099a9190613cf4565b612423565b6040516109ac9190614764565b60405180910390f35b3480156109c157600080fd5b506109dc60048036038101906109d79190613fd0565b612443565b005b3480156109ea57600080fd5b50610a056004803603810190610a009190613d21565b6124d9565b604051610a129190614764565b60405180910390f35b348015610a2757600080fd5b50610a3061256d565b604051610a3d9190614b61565b60405180910390f35b348015610a5257600080fd5b50610a6d6004803603810190610a689190613fd0565b612573565b005b348015610a7b57600080fd5b50610a966004803603810190610a919190613cf4565b612609565b005b348015610aa457600080fd5b50610abf6004803603810190610aba9190614019565b612701565b005b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b345750610b3382612787565b5b9050919050565b610b43612869565b73ffffffffffffffffffffffffffffffffffffffff16610b61611bce565b73ffffffffffffffffffffffffffffffffffffffff1614610bb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bae90614a41565b60405180910390fd5b80601260006101000a81548160ff02191690831515021790555050565b606060008054610be390614eeb565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0f90614eeb565b8015610c5c5780601f10610c3157610100808354040283529160200191610c5c565b820191906000526020600020905b815481529060010190602001808311610c3f57829003601f168201915b5050505050905090565b6000610c7182612871565b610cb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca790614a21565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60138054610cf890614eeb565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2490614eeb565b8015610d715780601f10610d4657610100808354040283529160200191610d71565b820191906000526020600020905b815481529060010190602001808311610d5457829003601f168201915b505050505081565b6000610d8482611402565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610df5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dec90614ac1565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610e14612869565b73ffffffffffffffffffffffffffffffffffffffff161480610e435750610e4281610e3d612869565b6124d9565b5b610e82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7990614961565b60405180910390fd5b610e8c83836128dd565b505050565b6000600880549050905090565b610eaf610ea9612869565b82612996565b610eee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee590614ae1565b60405180910390fd5b610ef9838383612a74565b505050565b6000610f098361155a565b8210610f4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f41906147e1565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b610fab612869565b73ffffffffffffffffffffffffffffffffffffffff16610fc9611bce565b73ffffffffffffffffffffffffffffffffffffffff161461101f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101690614a41565b60405180910390fd5b6000601460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600e5481565b601260029054906101000a900460ff1681565b61109b612869565b73ffffffffffffffffffffffffffffffffffffffff166110b9611bce565b73ffffffffffffffffffffffffffffffffffffffff161461110f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110690614a41565b60405180910390fd5b600047905060008111611157576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114e90614b41565b60405180910390fd5b60003373ffffffffffffffffffffffffffffffffffffffff168260405161117d90614688565b60006040518083038185875af1925050503d80600081146111ba576040519150601f19603f3d011682016040523d82523d6000602084013e6111bf565b606091505b5050905080611203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fa906147c1565b60405180910390fd5b5050565b6112228383836040518060200160405280600081525061212e565b505050565b606060006112348361155a565b905060008167ffffffffffffffff811115611252576112516150b3565b5b6040519080825280602002602001820160405280156112805781602001602082028036833780820191505090505b50905060005b828110156112ca576112988582610efe565b8282815181106112ab576112aa615084565b5b60200260200101818152505080806112c290614f4e565b915050611286565b508092505050919050565b60006112df610e91565b8210611320576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131790614b21565b60405180910390fd5b6008828154811061133457611333615084565b5b90600052602060002001549050919050565b601260019054906101000a900460ff1681565b611361612869565b73ffffffffffffffffffffffffffffffffffffffff1661137f611bce565b73ffffffffffffffffffffffffffffffffffffffff16146113d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113cc90614a41565b60405180910390fd5b80600b90805190602001906113eb9291906139cc565b5050565b601260009054906101000a900460ff1681565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156114ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a2906149a1565b60405180910390fd5b80915050919050565b60156020528060005260406000206000915090505481565b600b80546114d990614eeb565b80601f016020809104026020016040519081016040528092919081815260200182805461150590614eeb565b80156115525780601f1061152757610100808354040283529160200191611552565b820191906000526020600020905b81548152906001019060200180831161153557829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c290614981565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61161a612869565b73ffffffffffffffffffffffffffffffffffffffff16611638611bce565b73ffffffffffffffffffffffffffffffffffffffff161461168e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168590614a41565b60405180910390fd5b6116986000612cd0565b565b6000601154600e546116ac9190614d20565b9050601054601154106116f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116eb90614b01565b60405180910390fd5b6010546117003361155a565b1015611741576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173890614881565b60405180910390fd5b60005b8251811015611871573373ffffffffffffffffffffffffffffffffffffffff1661178784838151811061177a57611779615084565b5b6020026020010151611402565b73ffffffffffffffffffffffffffffffffffffffff16146117dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d490614a01565b60405180910390fd5b60001515601660008584815181106117f8576117f7615084565b5b6020026020010151815260200190815260200160002060009054906101000a900460ff1615151461185e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185590614921565b60405180910390fd5b808061186990614f4e565b915050611744565b50611888336001836118839190614d20565b612d96565b60016011546118979190614d20565b60118190555060005b8251811015611902576001601660008584815181106118c2576118c1615084565b5b6020026020010151815260200190815260200160002060006101000a81548160ff02191690831515021790555080806118fa90614f4e565b9150506118a0565b507fe0f0a7b009331e633d97520ff70e1c6a6776855c4315ed8057731e67f6625c0282823360405161193693929190614726565b60405180910390a15050565b600061194c610e91565b90506000821161195b57600080fd5b601260009054906101000a900460ff16156119ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a290614aa1565b60405180910390fd5b600082116119b857600080fd5b600e5482826119c79190614d20565b11156119d257600080fd5b601260039054906101000a900460ff16611a21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a18906149e1565b60405180910390fd5b81611a2b3361155a565b611a359190614d20565b601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015611ab6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aad90614941565b60405180910390fd5b6000600190505b828111611b3057611ad9338284611ad49190614d20565b612d96565b7f8a597e144748f647b3a5783f60e5d24d40173798fa7ed859b110ac9b2176694f8183611b069190614d20565b33604051611b15929190614b7c565b60405180910390a18080611b2890614f4e565b915050611abd565b505050565b611b3d612869565b73ffffffffffffffffffffffffffffffffffffffff16611b5b611bce565b73ffffffffffffffffffffffffffffffffffffffff1614611bb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba890614a41565b60405180910390fd5b80601260026101000a81548160ff02191690831515021790555050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611c00612869565b73ffffffffffffffffffffffffffffffffffffffff16611c1e611bce565b73ffffffffffffffffffffffffffffffffffffffff1614611c74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6b90614a41565b60405180910390fd5b80600d8190555050565b611c86612869565b73ffffffffffffffffffffffffffffffffffffffff16611ca4611bce565b73ffffffffffffffffffffffffffffffffffffffff1614611cfa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cf190614a41565b60405180910390fd5b80601260016101000a81548160ff02191690831515021790555050565b606060018054611d2690614eeb565b80601f0160208091040260200160405190810160405280929190818152602001828054611d5290614eeb565b8015611d9f5780601f10611d7457610100808354040283529160200191611d9f565b820191906000526020600020905b815481529060010190602001808311611d8257829003601f168201915b5050505050905090565b611db1612869565b73ffffffffffffffffffffffffffffffffffffffff16611dcf611bce565b73ffffffffffffffffffffffffffffffffffffffff1614611e25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e1c90614a41565b60405180910390fd5b60005b8151811015611eb657600160146000848481518110611e4a57611e49615084565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611eae90614f4e565b915050611e28565b5050565b600d5481565b6000611eca610e91565b9050601260009054906101000a900460ff1615611f1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f1390614aa1565b60405180910390fd5b60008211611f2957600080fd5b600e548282611f389190614d20565b1115611f4357600080fd5b611f4b611bce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120dd57600f54821115611f8c57600080fd5b81611f963361155a565b611fa09190614d20565b600f541015611fe4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fdb906148a1565b60405180910390fd5b60011515601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151461208c57601260029054906101000a900460ff1661208b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612082906147a1565b60405180910390fd5b5b81600d5461209a9190614da7565b3410156120dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d390614821565b60405180910390fd5b5b6000600190505b828111612113576121003382846120fb9190614d20565b612d96565b808061210b90614f4e565b9150506120e4565b505050565b61212a612123612869565b8383612db4565b5050565b61213f612139612869565b83612996565b61217e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217590614ae1565b60405180910390fd5b61218a84848484612f21565b50505050565b601260039054906101000a900460ff1681565b6121ab612869565b73ffffffffffffffffffffffffffffffffffffffff166121c9611bce565b73ffffffffffffffffffffffffffffffffffffffff161461221f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161221690614a41565b60405180910390fd5b80601260036101000a81548160ff02191690831515021790555050565b600c805461224990614eeb565b80601f016020809104026020016040519081016040528092919081815260200182805461227590614eeb565b80156122c25780601f10612297576101008083540402835291602001916122c2565b820191906000526020600020905b8154815290600101906020018083116122a557829003601f168201915b505050505081565b60606122d582612871565b612314576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230b90614a81565b60405180910390fd5b60001515601260019054906101000a900460ff16151514156123c2576013805461233d90614eeb565b80601f016020809104026020016040519081016040528092919081815260200182805461236990614eeb565b80156123b65780601f1061238b576101008083540402835291602001916123b6565b820191906000526020600020905b81548152906001019060200180831161239957829003601f168201915b5050505050905061241e565b60006123cc612f7d565b905060008151116123ec576040518060200160405280600081525061241a565b806123f68461300f565b600c60405160200161240a93929190614657565b6040516020818303038152906040525b9150505b919050565b60146020528060005260406000206000915054906101000a900460ff1681565b61244b612869565b73ffffffffffffffffffffffffffffffffffffffff16612469611bce565b73ffffffffffffffffffffffffffffffffffffffff16146124bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124b690614a41565b60405180910390fd5b80600c90805190602001906124d59291906139cc565b5050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600f5481565b61257b612869565b73ffffffffffffffffffffffffffffffffffffffff16612599611bce565b73ffffffffffffffffffffffffffffffffffffffff16146125ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e690614a41565b60405180910390fd5b80601390805190602001906126059291906139cc565b5050565b612611612869565b73ffffffffffffffffffffffffffffffffffffffff1661262f611bce565b73ffffffffffffffffffffffffffffffffffffffff1614612685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161267c90614a41565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156126f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126ec90614841565b60405180910390fd5b6126fe81612cd0565b50565b612709612869565b73ffffffffffffffffffffffffffffffffffffffff16612727611bce565b73ffffffffffffffffffffffffffffffffffffffff161461277d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161277490614a41565b60405180910390fd5b80600f8190555050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061285257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612862575061286182613170565b5b9050919050565b600033905090565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661295083611402565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006129a182612871565b6129e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129d790614901565b60405180910390fd5b60006129eb83611402565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612a5a57508373ffffffffffffffffffffffffffffffffffffffff16612a4284610c66565b73ffffffffffffffffffffffffffffffffffffffff16145b80612a6b5750612a6a81856124d9565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16612a9482611402565b73ffffffffffffffffffffffffffffffffffffffff1614612aea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ae190614a61565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612b5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b51906148c1565b60405180910390fd5b612b658383836131da565b612b706000826128dd565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612bc09190614e01565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612c179190614d20565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612db08282604051806020016040528060008152506132ee565b5050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612e23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e1a906148e1565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612f149190614764565b60405180910390a3505050565b612f2c848484612a74565b612f3884848484613349565b612f77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f6e90614801565b60405180910390fd5b50505050565b6060600b8054612f8c90614eeb565b80601f0160208091040260200160405190810160405280929190818152602001828054612fb890614eeb565b80156130055780601f10612fda57610100808354040283529160200191613005565b820191906000526020600020905b815481529060010190602001808311612fe857829003601f168201915b5050505050905090565b60606000821415613057576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061316b565b600082905060005b6000821461308957808061307290614f4e565b915050600a826130829190614d76565b915061305f565b60008167ffffffffffffffff8111156130a5576130a46150b3565b5b6040519080825280601f01601f1916602001820160405280156130d75781602001600182028036833780820191505090505b5090505b60008514613164576001826130f09190614e01565b9150600a856130ff9190614f97565b603061310b9190614d20565b60f81b81838151811061312157613120615084565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561315d9190614d76565b94506130db565b8093505050505b919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6131e58383836134e0565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561322857613223816134e5565b613267565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461326657613265838261352e565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156132aa576132a58161369b565b6132e9565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146132e8576132e7828261376c565b5b5b505050565b6132f883836137eb565b6133056000848484613349565b613344576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161333b90614801565b60405180910390fd5b505050565b600061336a8473ffffffffffffffffffffffffffffffffffffffff166139b9565b156134d3578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613393612869565b8786866040518563ffffffff1660e01b81526004016133b594939291906146b8565b602060405180830381600087803b1580156133cf57600080fd5b505af192505050801561340057506040513d601f19601f820116820180604052508101906133fd9190613fa3565b60015b613483573d8060008114613430576040519150601f19603f3d011682016040523d82523d6000602084013e613435565b606091505b5060008151141561347b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161347290614801565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506134d8565b600190505b949350505050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b6000600161353b8461155a565b6135459190614e01565b905060006007600084815260200190815260200160002054905081811461362a576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506136af9190614e01565b90506000600960008481526020019081526020016000205490506000600883815481106136df576136de615084565b5b90600052602060002001549050806008838154811061370157613700615084565b5b9060005260206000200181905550816009600083815260200190815260200160002081905550600960008581526020019081526020016000206000905560088054806137505761374f615055565b5b6001900381819060005260206000200160009055905550505050565b60006137778361155a565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561385b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613852906149c1565b60405180910390fd5b61386481612871565b156138a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161389b90614861565b60405180910390fd5b6138b0600083836131da565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546139009190614d20565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b600080823b905060008111915050919050565b8280546139d890614eeb565b90600052602060002090601f0160209004810192826139fa5760008555613a41565b82601f10613a1357805160ff1916838001178555613a41565b82800160010185558215613a41579182015b82811115613a40578251825591602001919060010190613a25565b5b509050613a4e9190613a52565b5090565b5b80821115613a6b576000816000905550600101613a53565b5090565b6000613a82613a7d84614bca565b614ba5565b90508083825260208201905082856020860282011115613aa557613aa46150e7565b5b60005b85811015613ad55781613abb8882613bd3565b845260208401935060208301925050600181019050613aa8565b5050509392505050565b6000613af2613aed84614bf6565b614ba5565b90508083825260208201905082856020860282011115613b1557613b146150e7565b5b60005b85811015613b455781613b2b8882613cdf565b845260208401935060208301925050600181019050613b18565b5050509392505050565b6000613b62613b5d84614c22565b614ba5565b905082815260208101848484011115613b7e57613b7d6150ec565b5b613b89848285614ea9565b509392505050565b6000613ba4613b9f84614c53565b614ba5565b905082815260208101848484011115613bc057613bbf6150ec565b5b613bcb848285614ea9565b509392505050565b600081359050613be2816158d5565b92915050565b600082601f830112613bfd57613bfc6150e2565b5b8135613c0d848260208601613a6f565b91505092915050565b600082601f830112613c2b57613c2a6150e2565b5b8135613c3b848260208601613adf565b91505092915050565b600081359050613c53816158ec565b92915050565b600081359050613c6881615903565b92915050565b600081519050613c7d81615903565b92915050565b600082601f830112613c9857613c976150e2565b5b8135613ca8848260208601613b4f565b91505092915050565b600082601f830112613cc657613cc56150e2565b5b8135613cd6848260208601613b91565b91505092915050565b600081359050613cee8161591a565b92915050565b600060208284031215613d0a57613d096150f6565b5b6000613d1884828501613bd3565b91505092915050565b60008060408385031215613d3857613d376150f6565b5b6000613d4685828601613bd3565b9250506020613d5785828601613bd3565b9150509250929050565b600080600060608486031215613d7a57613d796150f6565b5b6000613d8886828701613bd3565b9350506020613d9986828701613bd3565b9250506040613daa86828701613cdf565b9150509250925092565b60008060008060808587031215613dce57613dcd6150f6565b5b6000613ddc87828801613bd3565b9450506020613ded87828801613bd3565b9350506040613dfe87828801613cdf565b925050606085013567ffffffffffffffff811115613e1f57613e1e6150f1565b5b613e2b87828801613c83565b91505092959194509250565b60008060408385031215613e4e57613e4d6150f6565b5b6000613e5c85828601613bd3565b9250506020613e6d85828601613c44565b9150509250929050565b60008060408385031215613e8e57613e8d6150f6565b5b6000613e9c85828601613bd3565b9250506020613ead85828601613cdf565b9150509250929050565b600060208284031215613ecd57613ecc6150f6565b5b600082013567ffffffffffffffff811115613eeb57613eea6150f1565b5b613ef784828501613be8565b91505092915050565b600060208284031215613f1657613f156150f6565b5b600082013567ffffffffffffffff811115613f3457613f336150f1565b5b613f4084828501613c16565b91505092915050565b600060208284031215613f5f57613f5e6150f6565b5b6000613f6d84828501613c44565b91505092915050565b600060208284031215613f8c57613f8b6150f6565b5b6000613f9a84828501613c59565b91505092915050565b600060208284031215613fb957613fb86150f6565b5b6000613fc784828501613c6e565b91505092915050565b600060208284031215613fe657613fe56150f6565b5b600082013567ffffffffffffffff811115614004576140036150f1565b5b61401084828501613cb1565b91505092915050565b60006020828403121561402f5761402e6150f6565b5b600061403d84828501613cdf565b91505092915050565b60006140528383614639565b60208301905092915050565b61406781614e35565b82525050565b600061407882614ca9565b6140828185614cd7565b935061408d83614c84565b8060005b838110156140be5781516140a58882614046565b97506140b083614cca565b925050600181019050614091565b5085935050505092915050565b6140d481614e47565b82525050565b60006140e582614cb4565b6140ef8185614ce8565b93506140ff818560208601614eb8565b614108816150fb565b840191505092915050565b600061411e82614cbf565b6141288185614d04565b9350614138818560208601614eb8565b614141816150fb565b840191505092915050565b600061415782614cbf565b6141618185614d15565b9350614171818560208601614eb8565b80840191505092915050565b6000815461418a81614eeb565b6141948186614d15565b945060018216600081146141af57600181146141c0576141f3565b60ff198316865281860193506141f3565b6141c985614c94565b60005b838110156141eb578154818901526001820191506020810190506141cc565b838801955050505b50505092915050565b6000614209602483614d04565b91506142148261510c565b604082019050919050565b600061422c601383614d04565b91506142378261515b565b602082019050919050565b600061424f602b83614d04565b915061425a82615184565b604082019050919050565b6000614272603283614d04565b915061427d826151d3565b604082019050919050565b6000614295601f83614d04565b91506142a082615222565b602082019050919050565b60006142b8602683614d04565b91506142c38261524b565b604082019050919050565b60006142db601c83614d04565b91506142e68261529a565b602082019050919050565b60006142fe602c83614d04565b9150614309826152c3565b604082019050919050565b6000614321602583614d04565b915061432c82615312565b604082019050919050565b6000614344602483614d04565b915061434f82615361565b604082019050919050565b6000614367601983614d04565b9150614372826153b0565b602082019050919050565b600061438a602c83614d04565b9150614395826153d9565b604082019050919050565b60006143ad602883614d04565b91506143b882615428565b604082019050919050565b60006143d0601a83614d04565b91506143db82615477565b602082019050919050565b60006143f3603883614d04565b91506143fe826154a0565b604082019050919050565b6000614416602a83614d04565b9150614421826154ef565b604082019050919050565b6000614439602983614d04565b91506144448261553e565b604082019050919050565b600061445c602083614d04565b91506144678261558d565b602082019050919050565b600061447f602083614d04565b915061448a826155b6565b602082019050919050565b60006144a2603483614d04565b91506144ad826155df565b604082019050919050565b60006144c5602c83614d04565b91506144d08261562e565b604082019050919050565b60006144e8602083614d04565b91506144f38261567d565b602082019050919050565b600061450b602983614d04565b9150614516826156a6565b604082019050919050565b600061452e602f83614d04565b9150614539826156f5565b604082019050919050565b6000614551601983614d04565b915061455c82615744565b602082019050919050565b6000614574602183614d04565b915061457f8261576d565b604082019050919050565b6000614597600083614cf9565b91506145a2826157bc565b600082019050919050565b60006145ba603183614d04565b91506145c5826157bf565b604082019050919050565b60006145dd602683614d04565b91506145e88261580e565b604082019050919050565b6000614600602c83614d04565b915061460b8261585d565b604082019050919050565b6000614623601d83614d04565b915061462e826158ac565b602082019050919050565b61464281614e9f565b82525050565b61465181614e9f565b82525050565b6000614663828661414c565b915061466f828561414c565b915061467b828461417d565b9150819050949350505050565b60006146938261458a565b9150819050919050565b60006020820190506146b2600083018461405e565b92915050565b60006080820190506146cd600083018761405e565b6146da602083018661405e565b6146e76040830185614648565b81810360608301526146f981846140da565b905095945050505050565b6000602082019050818103600083015261471e818461406d565b905092915050565b60006060820190508181036000830152614740818661406d565b905061474f6020830185614648565b61475c604083018461405e565b949350505050565b600060208201905061477960008301846140cb565b92915050565b600060208201905081810360008301526147998184614113565b905092915050565b600060208201905081810360008301526147ba816141fc565b9050919050565b600060208201905081810360008301526147da8161421f565b9050919050565b600060208201905081810360008301526147fa81614242565b9050919050565b6000602082019050818103600083015261481a81614265565b9050919050565b6000602082019050818103600083015261483a81614288565b9050919050565b6000602082019050818103600083015261485a816142ab565b9050919050565b6000602082019050818103600083015261487a816142ce565b9050919050565b6000602082019050818103600083015261489a816142f1565b9050919050565b600060208201905081810360008301526148ba81614314565b9050919050565b600060208201905081810360008301526148da81614337565b9050919050565b600060208201905081810360008301526148fa8161435a565b9050919050565b6000602082019050818103600083015261491a8161437d565b9050919050565b6000602082019050818103600083015261493a816143a0565b9050919050565b6000602082019050818103600083015261495a816143c3565b9050919050565b6000602082019050818103600083015261497a816143e6565b9050919050565b6000602082019050818103600083015261499a81614409565b9050919050565b600060208201905081810360008301526149ba8161442c565b9050919050565b600060208201905081810360008301526149da8161444f565b9050919050565b600060208201905081810360008301526149fa81614472565b9050919050565b60006020820190508181036000830152614a1a81614495565b9050919050565b60006020820190508181036000830152614a3a816144b8565b9050919050565b60006020820190508181036000830152614a5a816144db565b9050919050565b60006020820190508181036000830152614a7a816144fe565b9050919050565b60006020820190508181036000830152614a9a81614521565b9050919050565b60006020820190508181036000830152614aba81614544565b9050919050565b60006020820190508181036000830152614ada81614567565b9050919050565b60006020820190508181036000830152614afa816145ad565b9050919050565b60006020820190508181036000830152614b1a816145d0565b9050919050565b60006020820190508181036000830152614b3a816145f3565b9050919050565b60006020820190508181036000830152614b5a81614616565b9050919050565b6000602082019050614b766000830184614648565b92915050565b6000604082019050614b916000830185614648565b614b9e602083018461405e565b9392505050565b6000614baf614bc0565b9050614bbb8282614f1d565b919050565b6000604051905090565b600067ffffffffffffffff821115614be557614be46150b3565b5b602082029050602081019050919050565b600067ffffffffffffffff821115614c1157614c106150b3565b5b602082029050602081019050919050565b600067ffffffffffffffff821115614c3d57614c3c6150b3565b5b614c46826150fb565b9050602081019050919050565b600067ffffffffffffffff821115614c6e57614c6d6150b3565b5b614c77826150fb565b9050602081019050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000614d2b82614e9f565b9150614d3683614e9f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614d6b57614d6a614fc8565b5b828201905092915050565b6000614d8182614e9f565b9150614d8c83614e9f565b925082614d9c57614d9b614ff7565b5b828204905092915050565b6000614db282614e9f565b9150614dbd83614e9f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614df657614df5614fc8565b5b828202905092915050565b6000614e0c82614e9f565b9150614e1783614e9f565b925082821015614e2a57614e29614fc8565b5b828203905092915050565b6000614e4082614e7f565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015614ed6578082015181840152602081019050614ebb565b83811115614ee5576000848401525b50505050565b60006002820490506001821680614f0357607f821691505b60208210811415614f1757614f16615026565b5b50919050565b614f26826150fb565b810181811067ffffffffffffffff82111715614f4557614f446150b3565b5b80604052505050565b6000614f5982614e9f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614f8c57614f8b614fc8565b5b600182019050919050565b6000614fa282614e9f565b9150614fad83614e9f565b925082614fbd57614fbc614ff7565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f536f7272792c20796f7520617265206e6f7420696e207468652077686974656c60008201527f6973742e00000000000000000000000000000000000000000000000000000000602082015250565b7f5472616e73616374696f6e206661696c65642e00000000000000000000000000600082015250565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4e6f7420656e6f7567682065746865727320746f206d696e74204e4654732e00600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4e6f742073756666696369656e7420746f6b656e7320746f206d696e74206c6560008201527f67656e64727920746f6b656e0000000000000000000000000000000000000000602082015250565b7f4e6f7420656c696769626c6520746f206d696e74207468697320616c6c6f636160008201527f74696f6e2e000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f746f6b656e20616c7265616479207573656420666f72204c6567656e6472792060008201527f6d696e74696e672e000000000000000000000000000000000000000000000000602082015250565b7f52656163686564206d6178696d756d20616c6c6f636174696f6e000000000000600082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f507269766174652073616c6520686173206e6f74207374617274656420796574600082015250565b7f43616e6e6f7420696e746572616374207769746820612053757065724372656160008201527f746f727320796f7520646f206e6f74206f776e2e000000000000000000000000602082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b7f53616c6520686173206e6f742073746172746564207965742e00000000000000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b50565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f416c6c206c6567656e64727920746f6b656e732061726520616c72656164792060008201527f6d696e7465640000000000000000000000000000000000000000000000000000602082015250565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b7f4e6f7420656e6f75676820457468657220746f20776974686472617721000000600082015250565b6158de81614e35565b81146158e957600080fd5b50565b6158f581614e47565b811461590057600080fd5b50565b61590c81614e53565b811461591757600080fd5b50565b61592381614e9f565b811461592e57600080fd5b5056fea264697066735822122014181ef4d02a7124b729c531fc5606c2d08f29bdd7f0844fb27d3f9230f1013264736f6c63430008070033
Verified Source Code Partial Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: No
SuperCreators.sol 1509 lines
// File: @openzeppelin/contracts/utils/Strings.sol
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
// SPDX-License-Identifier: GPL-3.0
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/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: @openzeppelin/contracts/access/Ownable.sol
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_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);
}
}
// 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: @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/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 the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}
// 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/token/ERC721/ERC721.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
// File: @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)
pragma solidity ^0.8.0;
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnumeration(from, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (to != from) {
_addTokenToOwnerEnumeration(to, tokenId);
}
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
}
// File: contracts/SuperCreators.sol
pragma solidity >=0.7.0 <0.9.0;
contract SuperCreators is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public Price = 0.11 ether;
uint256 public maxGenCount = 2222;
uint256 public maxMintTokens = 5;
uint256 private maxLegendMint = 7;
uint256 private legendMinted = 0;
bool public paused = false;
bool public revealed = false;
bool public publicSale = false;
bool public privateSale = false;
string public notRevealedUri;
mapping(address => bool) public whitelisted;
mapping(address => uint256) public teamListed;
mapping(uint256 => bool) private tokenForChakra;
constructor(
string memory _initBaseURI,
string memory _initNotRevealedUri
) ERC721("Super Creators By IAC", "SCIAC") {
setBaseURI(_initBaseURI);
setNotRevealedURI(_initNotRevealedUri);
defineTeams();
}
function defineTeams() private {
teamListed[0x1b7eAE5277D859e6f55Bc4Cd5BE5Bab29c1E3635]=123;
teamListed[0xCec5110117210CA389c49D625ba3E4b588c9024C]=2;
teamListed[0xCdebcC6563B6eBB0aE624dC8bc2cFbc9A79663Eb]=2;
teamListed[0x85BD21337d6FBc29E3c8A628e08C4df38CdF255C]=2;
teamListed[0x66197989800C6C1eef622eb0B8a54e82033a8A1D]=2;
teamListed[0x50DDf40D3D10fDC6776F078040FBDb487B0dD1F4]=2;
teamListed[0x571CAEEEF2403b73cd0413c5753deDEdCa8Ce283]=2;
teamListed[0xF355A34F88D1Dad659E241a59B722F4bE6521F25]=2;
teamListed[0xF9E9D3867a3B358cfd138666161D9DD1E04569E4]=2;
teamListed[0x375AF9155618F0b56B51f67F24C5Fc637B62107d]=2;
teamListed[0xcB90261dEeBEb279E56FB7e9289c1d576C0bb24d]=2;
teamListed[0x04534c862D30f4643F109aa492EA67A4b777dA46]=2;
teamListed[0xCAB95aa883B0E0D4363237A88CD4eC46EB5DE266]=2;
teamListed[0x52E3343CF582742bA75B6E0E9cbfc74437CA8c39]=2;
teamListed[0xF3C496B3D71d717A450CD6E2110FdD0b02f887e0]=2;
teamListed[0x576837B396457b69BB430CA3bAF922A558D4Ee8F]=2;
teamListed[0xab40E74b26EaE2980e1a45Fdb4570f2c240aB23b]=2;
teamListed[0x36A9c6BEE260de97c36f92C941573C19C05913ab]=2;
teamListed[0xb00029fe31E12517dDa4B691c543a156AD4a12cD]=2;
teamListed[0x2975e1B6eB526ab8Edd6421202a3C14F9bB917d8]=2;
teamListed[0xa6C49Bf2E7aD88bDa7F9D64A2cC9D0EDa171f7cA]=2;
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
event teamTokens(uint256 scid,address minter);
event SCLegendry(uint256[] usedTokens, uint256 legendid,address minter);
// public functions
function mint(uint256 _noOfTokens) public payable {
uint256 supply = totalSupply();
require(!paused,"Sale has not started yet.");
require(_noOfTokens > 0);
require(supply + _noOfTokens <= maxGenCount);
//Only whitelisted user is allowed to mint until public sale not started.
if (msg.sender != owner()) {
require(_noOfTokens <= maxMintTokens);
require(maxMintTokens >= balanceOf(msg.sender) +_noOfTokens ,"Not eligible to mint this allocation." );
if(whitelisted[msg.sender] != true) {
require(publicSale,"Sorry, you are not in the whitelist.");
}
require(msg.value >= Price * _noOfTokens ,"Not enough ethers to mint NFTs.");
}
for (uint256 i = 1; i <= _noOfTokens; i++) {
_safeMint(msg.sender, supply+i);
}
}
function PrivateMint(uint256 _noOfTokens) public payable {
uint256 supply = totalSupply();
require(_noOfTokens > 0);
require(!paused,"Sale has not started yet.");
require(_noOfTokens > 0);
require(supply + _noOfTokens <= maxGenCount);
require(privateSale,"Private sale has not started yet");
require(teamListed[msg.sender] >= balanceOf(msg.sender) +_noOfTokens ,"Reached maximum allocation" );
for (uint256 i = 1; i <= _noOfTokens; i++) {
_safeMint(msg.sender, supply+i);
emit teamTokens (supply+i, msg.sender);
}
}
function legendryMint(uint256[] memory chakrasTokens)public {
uint256 legendId = maxGenCount + legendMinted;
require(legendMinted < maxLegendMint,"All legendry tokens are already minted");
require(balanceOf(msg.sender) >= maxLegendMint,"Not sufficient tokens to mint legendry token");
for (uint256 i = 0; i < chakrasTokens.length; i++) {
require(ownerOf(chakrasTokens[i]) == msg.sender, "Cannot interact with a SuperCreators you do not own.");
require(tokenForChakra[chakrasTokens[i]]==false, "token already used for Legendry minting.");
}
_safeMint(msg.sender, legendId+1);
legendMinted = legendMinted+1;
for (uint256 i = 0; i < chakrasTokens.length; i++) {
tokenForChakra[chakrasTokens[i]]=true;
}
emit SCLegendry(chakrasTokens,legendId,msg.sender);
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
uint256 ownerTokenCount = balanceOf(_owner);
uint256[] memory tokenIds = new uint256[](ownerTokenCount);
for (uint256 i; i < ownerTokenCount; i++) {
tokenIds[i] = tokenOfOwnerByIndex(_owner, i);
}
return tokenIds;
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
require(
_exists(tokenId),
"ERC721Metadata: URI query for nonexistent token"
);
...
// [truncated — 51789 bytes total]
Read Contract
Price 0x9dfde201 → uint256
balanceOf 0x70a08231 → uint256
baseExtension 0xc6682862 → string
baseURI 0x6c0360eb → string
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
maxGenCount 0x3299c120 → uint256
maxMintTokens 0xec912c83 → uint256
name 0x06fdde03 → string
notRevealedUri 0x081c8c44 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
privateSale 0xba1f879f → bool
publicSale 0x33bc1c5c → bool
revealed 0x51830227 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
teamListed 0x6ac7ca14 → uint256
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
walletOfOwner 0x438b6300 → uint256[]
whitelisted 0xd936547e → bool
Write Contract 22 functions
These functions modify contract state and require a wallet transaction to execute.
PrivateMint 0x8075fa47
uint256 _noOfTokens
approve 0x095ea7b3
address to
uint256 tokenId
legendryMint 0x77227139
uint256[] chakrasTokens
mint 0xa0712d68
uint256 _noOfTokens
pause 0x02329a29
bool _state
privateSaleStarted 0xba582d73
bool _state
publicSaleStarted 0x8c851e5f
bool _state
removeWhitelistUser 0x30cc7ae0
address _user
renounceOwnership 0x715018a6
No parameters
reveal 0x940cd05b
bool _state
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseExtension 0xda3ef23f
string _newBaseExtension
setBaseURI 0x55f804b3
string _newBaseURI
setNotRevealedURI 0xf2c4ce1e
string _notRevealedURI
setPrice 0x91b7f5ed
uint256 _newPrice
setmaxMintTokens 0xfd9d2f4f
uint256 _newmaxMintTokens
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
whitelistUser 0x9b6fbf8a
address[] _user
withdraw 0x3ccfd60b
No parameters
Token Balances (1)
View Transfers →Recent Transactions
No transactions found for this address