Address Contract Partially Verified
Address
0x600f53415109FDE7E46De037a689Aa9c85e02871
Balance
0 ETH
Nonce
1
Code Size
16886 bytes
Creator
0x450525Dd...C88E at tx 0xd0bfc997...6f2e0e
Indexed Transactions
0
Contract Bytecode
16886 bytes
0x6080604052600436106103e35760003560e01c8063853828b611610208578063bec0904b11610118578063eb238e81116100ab578063f2fde38b1161007a578063f2fde38b14610c68578063f623bb8b14610c88578063f7436e3714610c9e578063fc2f383214610cbe578063fe6d3cc814610cde57600080fd5b8063eb238e8114610bd3578063eec8e90814610c08578063f1e3311514610c28578063f242432a14610c4857600080fd5b8063e6c6990a116100e7578063e6c6990a14610b3b578063e82da69114610b55578063e8a3d48514610b75578063e985e9c514610b8a57600080fd5b8063bec0904b14610aa6578063d2de022f14610adb578063d8800f9414610afb578063dfdedf6914610b1b57600080fd5b8063a1af10ca1161019b578063b40ebceb1161016a578063b40ebceb14610a10578063bb6074e014610a30578063bb62115e14610a43578063bc1f0ab514610a59578063bd85b03914610a7957600080fd5b8063a1af10ca14610990578063a22cb465146109b0578063a7593fb7146109d0578063ac80746a146109f057600080fd5b80638da5cb5b116101d75780638da5cb5b1461091057806395d89b411461092e5780639b192647146109435780639e490e241461096357600080fd5b8063853828b614610876578063869e9a001461088b578063891bbe73146108ab5780638c04b8e9146108e357600080fd5b80634790c92511610303578063628d35c911610296578063715018a611610265578063715018a6146107c2578063736e04fa146107d75780637aa9c33f1461080c57806383e083c31461082c5780638456cb591461086157600080fd5b8063628d35c91461074f5780636586375b1461076f5780636af3ef581461078f5780636c6acd4d146107a257600080fd5b80634e5298a0116102d25780634e5298a0146106a85780634f558e79146106e85780635c975abb146107175780635cf4ee911461072f57600080fd5b80634790c925146106015780634bf4e087146106215780634d09ae6d1461064e5780634e1273f41461067b57600080fd5b80632eb2c2d61161037b5780633e07311c1161034a5780633e07311c146105965780633e511168146105ac5780633f4ba83a146105cc57806343696f18146105e157600080fd5b80632eb2c2d61461050f5780633832e8701461052f57806338b903331461054f57806338df41ac1461057657600080fd5b8063134902fd116103b7578063134902fd1461048d578063143727c9146104ad578063162094c4146104cd578063286c8137146104ef57600080fd5b8062fdd58e146103e857806301ffc9a71461041b57806306fdde031461044b5780630e89341c1461046d575b600080fd5b3480156103f457600080fd5b506104086104033660046134fd565b610cfe565b6040519081526020015b60405180910390f35b34801561042757600080fd5b5061043b61043636600461353d565b610d97565b6040519015158152602001610412565b34801561045757600080fd5b50610460610de9565b60405161041291906135a7565b34801561047957600080fd5b506104606104883660046135ba565b610e77565b34801561049957600080fd5b5061043b6104a83660046135ba565b610f44565b3480156104b957600080fd5b506104086104c83660046135ba565b610f89565b3480156104d957600080fd5b506104ed6104e8366004613688565b610ffe565b005b3480156104fb57600080fd5b5061040861050a3660046135ba565b611056565b34801561051b57600080fd5b506104ed61052a366004613762565b611077565b34801561053b57600080fd5b506104ed61054a36600461380b565b61121c565b34801561055b57600080fd5b50610564600481565b60405160ff9091168152602001610412565b34801561058257600080fd5b506104ed61059136600461382d565b6112cc565b3480156105a257600080fd5b50610408600c5481565b3480156105b857600080fd5b506104ed6105c736600461380b565b6113db565b3480156105d857600080fd5b506104ed611413565b3480156105ed57600080fd5b506104ed6105fc366004613860565b611425565b34801561060d57600080fd5b506104ed61061c3660046135ba565b61149e565b34801561062d57600080fd5b5061040861063c3660046135ba565b60009081526012602052604090205490565b34801561065a57600080fd5b506104086106693660046135ba565b6000908152600e602052604090205490565b34801561068757600080fd5b5061069b6106963660046138e8565b611520565b604051610412919061397c565b3480156106b457600080fd5b506104086106c336600461398f565b6001600160a01b03166000908152601360209081526040808320938352929052205490565b3480156106f457600080fd5b5061043b6107033660046135ba565b600090815260086020526040902054151590565b34801561072357600080fd5b5060065460ff1661043b565b34801561073b57600080fd5b5061040861074a36600461380b565b611649565b34801561075b57600080fd5b506104ed61076a3660046135ba565b611697565b34801561077b57600080fd5b506104ed61078a3660046135ba565b6116b7565b6104ed61079d36600461382d565b6116d7565b3480156107ae57600080fd5b506104ed6107bd3660046139bb565b611875565b3480156107ce57600080fd5b506104ed6118cd565b3480156107e357600080fd5b5061043b6107f23660046135ba565b60009081526011602052604090205460ff16151560011490565b34801561081857600080fd5b506104ed61082736600461380b565b6118df565b34801561083857600080fd5b5061043b6108473660046135ba565b6000908152600d602052604090205460ff16151560011490565b34801561086d57600080fd5b506104ed6118f9565b34801561088257600080fd5b506104ed611909565b34801561089757600080fd5b506104ed6108a6366004613a16565b611926565b3480156108b757600080fd5b506108cb6108c63660046135ba565b61194e565b6040516001600160a01b039091168152602001610412565b3480156108ef57600080fd5b506104086108fe3660046135ba565b60009081526014602052604090205490565b34801561091c57600080fd5b506004546001600160a01b03166108cb565b34801561093a57600080fd5b50610460611978565b34801561094f57600080fd5b506104ed61095e3660046135ba565b611985565b34801561096f57600080fd5b5061040861097e3660046135ba565b60009081526010602052604090205490565b34801561099c57600080fd5b5061043b6109ab366004613860565b6119a8565b3480156109bc57600080fd5b506104ed6109cb366004613a46565b6119f4565b3480156109dc57600080fd5b506104ed6109eb3660046135ba565b611a09565b3480156109fc57600080fd5b506104ed610a0b36600461398f565b611a42565b348015610a1c57600080fd5b506104ed610a2b3660046134fd565b611a70565b6104ed610a3e366004613abd565b611c6d565b348015610a4f57600080fd5b5061040860185481565b348015610a6557600080fd5b506104ed610a743660046135ba565b611e3a565b348015610a8557600080fd5b50610408610a943660046135ba565b60009081526008602052604090205490565b348015610ab257600080fd5b5061043b610ac13660046135ba565b60009081526007602052604090205460ff16151560011490565b348015610ae757600080fd5b5061043b610af6366004613b24565b611e5d565b348015610b0757600080fd5b506104ed610b1636600461380b565b611f47565b348015610b2757600080fd5b506104ed610b36366004613860565b611f7f565b348015610b4757600080fd5b5060165461043b9060ff1681565b348015610b6157600080fd5b506104ed610b703660046135ba565b611ff3565b348015610b8157600080fd5b50610460612013565b348015610b9657600080fd5b5061043b610ba5366004613b7d565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b348015610bdf57600080fd5b5061043b610bee3660046135ba565b60009081526015602052604090205460ff16151560011490565b348015610c1457600080fd5b506104ed610c233660046135ba565b612033565b348015610c3457600080fd5b506104ed610c4336600461380b565b6120b5565b348015610c5457600080fd5b506104ed610c63366004613ba7565b61212d565b348015610c7457600080fd5b506104ed610c83366004613860565b612249565b348015610c9457600080fd5b50610408600f5481565b348015610caa57600080fd5b506104ed610cb9366004613c0b565b6122c2565b348015610cca57600080fd5b5061043b610cd9366004613cb9565b612411565b348015610cea57600080fd5b506104ed610cf93660046135ba565b612496565b60006001600160a01b038316610d6f5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060009081526001602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b1480610dc857506001600160e01b031982166303a24d0760e21b145b80610de357506301ffc9a760e01b6001600160e01b03198316145b92915050565b60198054610df690613cee565b80601f0160208091040260200160405190810160405280929190818152602001828054610e2290613cee565b8015610e6f5780601f10610e4457610100808354040283529160200191610e6f565b820191906000526020600020905b815481529060010190602001808311610e5257829003601f168201915b505050505081565b600081815260086020526040902054606090610ea65760405163677510db60e11b815260040160405180910390fd5b6000828152601b602052604090208054610ebf90613cee565b80601f0160208091040260200160405190810160405280929190818152602001828054610eeb90613cee565b8015610f385780601f10610f0d57610100808354040283529160200191610f38565b820191906000526020600020905b815481529060010190602001808311610f1b57829003601f168201915b50505050509050919050565b600081815260086020526040812054610f705760405163677510db60e11b815260040160405180910390fd5b5060009081526020819052604090205460ff9081161490565b600081815260086020526040812054610fb55760405163677510db60e11b815260040160405180910390fd5b610fd38260009081526007602052604090205460ff16151560011490565b610feb57600082815260096020526040902054610de3565b5060009081526008602052604090205490565b6110066124b9565b6000828152600860205260409020546110325760405163677510db60e11b815260040160405180910390fd5b6000828152601b60209081526040909120825161105192840190613448565b505050565b600b818154811061106657600080fd5b600091825260209091200154905081565b846daaeb6d7670e522a718067333cd4e3b15611160576001600160a01b0381163314156111575760005b845181101561110c576000808683815181106110bf576110bf613d29565b60209081029190910181015182528101919091526040016000205460ff908116146110fc5760405162461bcd60e51b8152600401610d6690613d3f565b61110581613d8c565b90506110a1565b506001600160a01b03861633148061112957506111298633610ba5565b6111455760405162461bcd60e51b8152600401610d6690613da7565b6111528686868686612543565b611214565b61116081612729565b60005b84518110156111ce5760008086838151811061118157611181613d29565b60209081029190910181015182528101919091526040016000205460ff908116146111be5760405162461bcd60e51b8152600401610d6690613d3f565b6111c781613d8c565b9050611163565b506001600160a01b0386163314806111eb57506111eb8633610ba5565b6112075760405162461bcd60e51b8152600401610d6690613da7565b6112148686868686612543565b505050505050565b6112246124b9565b6000828152600860205260409020546112505760405163677510db60e11b815260040160405180910390fd5b61126e8260009081526007602052604090205460ff16151560011490565b1561128c5760405163222f7ae360e21b815260040160405180910390fd5b60008281526009602052604090205481116112ba576040516325ede60b60e11b815260040160405180910390fd5b60009182526009602052604090912055565b6112d46124b9565b6000828152600860205260409020546113005760405163677510db60e11b815260040160405180910390fd5b8061131e5760405163b562e8dd60e01b815260040160405180910390fd5b611328828261285c565b6113455760405163a4875a4960e01b815260040160405180910390fd5b6110518383836017805461135890613cee565b80601f016020809104026020016040519081016040528092919081815260200182805461138490613cee565b80156113d15780601f106113a6576101008083540402835291602001916113d1565b820191906000526020600020905b8154815290600101906020018083116113b457829003601f168201915b50505050506128aa565b6113e36124b9565b8061140157604051631e1d0ab560e01b815260040160405180910390fd5b60009182526010602052604090912055565b61141b6124b9565b6114236129bc565b565b61142d612a4f565b6001600160a01b0381166114535760405162afb37360e31b815260040160405180910390fd5b61145c816119a8565b1561147a57604051631002377360e01b815260040160405180910390fd5b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b6114a66124b9565b6000818152600860205260409020546114d25760405163677510db60e11b815260040160405180910390fd5b60008181526020819052604090205460ff90811614156115055760405163a28a88c160e01b815260040160405180910390fd5b6000908152602081905260409020805460ff191660ff179055565b606081518351146115855760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610d66565b600083516001600160401b038111156115a0576115a06135d3565b6040519080825280602002602001820160405280156115c9578160200160208202803683370190505b50905060005b8451811015611641576116148582815181106115ed576115ed613d29565b602002602001015185838151811061160757611607613d29565b6020026020010151610cfe565b82828151811061162657611626613d29565b602090810291909101015261163a81613d8c565b90506115cf565b509392505050565b60008161166957604051631e1d0ab560e01b815260040160405180910390fd5b600f546000848152600e6020526040902054611686908490613df9565b6116909190613e18565b9392505050565b61169f6124b9565b6000908152600d60205260409020805460ff19169055565b6116bf6124b9565b6000908152601560205260409020805460ff19169055565b60065460ff16156116fa5760405162461bcd60e51b8152600401610d6690613e30565b6000828152600860205260409020546117265760405163677510db60e11b815260040160405180910390fd5b806117445760405163b562e8dd60e01b815260040160405180910390fd5b600082815260106020526040902054811115611773576040516344e9090d60e11b815260040160405180910390fd5b61177d828261285c565b61179a5760405163a4875a4960e01b815260040160405180910390fd5b6117a48282611649565b34146117c35760405163078d696560e31b815260040160405180910390fd5b6117e18260009081526015602052604090205460ff16151560011490565b156117ff576040516316851fc760e11b815260040160405180910390fd5b61181d826000908152600d602052604090205460ff16151560011490565b61183a576040516316851fc760e11b815260040160405180910390fd5b611845828483612411565b6118625760405163034fc3d760e21b815260040160405180910390fd5b61186a612aa9565b611345828483612aeb565b61187d6124b9565b60005b83518110156118c7576118b584828151811061189e5761189e613d29565b602002602001015184846017805461135890613cee565b806118bf81613d8c565b915050611880565b50505050565b6118d5612a4f565b6114236000612b44565b6118e76124b9565b6000918252600e602052604090912055565b6119016124b9565b611423612b96565b6119116124b9565b6000471161191e57600080fd5b611423612bee565b61192e6124b9565b600091825260076020526040909120805460ff1916911515919091179055565b600a818154811061195e57600080fd5b6000918252602090912001546001600160a01b0316905081565b601a8054610df690613cee565b61198d6124b9565b6000908152600d60205260409020805460ff19166001179055565b60006001600160a01b0382166119d05760405162afb37360e31b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205460ff16151560011490565b816119fe81612c7c565b611051338484612d44565b3373a9dac8f3aedc55d0fe707b86b8a45d246858d2e114611a3d57604051639b96b05160e01b815260040160405180910390fd5b600f55565b611a4a6124b9565b6001600160a01b0316600090815260136020908152604080832093835292905290812055565b611a786124b9565b60008111611a8557600080fd5b6040516370a0823160e01b8152306004820152829082906001600160a01b038316906370a082319060240160206040518083038186803b158015611ac857600080fd5b505afa158015611adc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b009190613e5a565b1015611b5a5760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f74206f776e20656e6f75676820746f6b604482015262656e7360e81b6064820152608401610d66565b60005b600c548110156118c757816001600160a01b031663a9059cbb600a8381548110611b8957611b89613d29565b9060005260206000200160009054906101000a90046001600160a01b03166064600b8581548110611bbc57611bbc613d29565b906000526020600020015487611bd29190613df9565b611bdc9190613e73565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b158015611c2257600080fd5b505af1158015611c36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c5a9190613e95565b5080611c6581613d8c565b915050611b5d565b60065460ff1615611c905760405162461bcd60e51b8152600401610d6690613e30565b600084815260086020526040902054611cbc5760405163677510db60e11b815260040160405180910390fd5b82611cda5760405163b562e8dd60e01b815260040160405180910390fd5b600084815260106020526040902054831115611d09576040516344e9090d60e11b815260040160405180910390fd5b611d13848461285c565b611d305760405163a4875a4960e01b815260040160405180910390fd5b611d3a8484611649565b3414611d595760405163078d696560e31b815260040160405180910390fd5b611d778460009081526015602052604090205460ff16151560011490565b1580611d9e5750611d9c846000908152600d602052604090205460ff16151560011490565b155b15611dbc576040516309c7220160e31b815260040160405180910390fd5b611dc885858484611e5d565b611de5576040516315ebf2b560e21b815260040160405180910390fd5b611df0848685612411565b611e0d5760405163034fc3d760e21b815260040160405180910390fd5b611e15612aa9565b611e20848685612aeb565b611e338585856017805461135890613cee565b5050505050565b611e426124b9565b6000908152601560205260409020805460ff19166001179055565b600083815260146020526040812054611eb85760405162461bcd60e51b815260206004820152601760248201527f4d65726b6c6520726f6f74206973206e6f7420736574210000000000000000006044820152606401610d66565b6040516bffffffffffffffffffffffff19606087901b166020820152600090603401604051602081830303815290604052805190602001209050611f3d84848080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a8152601460205260409020549250859150612e259050565b9695505050505050565b611f4f6124b9565b80611f6d57604051631e1d0ab560e01b815260040160405180910390fd5b60009182526012602052604090912055565b611f87612a4f565b6001600160a01b038116611fad5760405162afb37360e31b815260040160405180910390fd5b611fb6816119a8565b611fd25760405162afb37360e31b815260040160405180910390fd5b6001600160a01b03166000908152600560205260409020805460ff19169055565b611ffb6124b9565b6000908152601160205260409020805460ff19169055565b606060405180608001604052806044815260200161417d60449139905090565b61203b6124b9565b6000818152600860205260409020546120675760405163677510db60e11b815260040160405180910390fd5b60008181526020819052604090205460ff166001141561209a5760405163a28a88c160e01b815260040160405180910390fd5b6000908152602081905260409020805460ff19166001179055565b6120bd6124b9565b60008281526014602052604090205481141561211b5760405162461bcd60e51b815260206004820152601e60248201527f4d65726b6c6520726f6f742077696c6c20626520756e6368616e6765642100006044820152606401610d66565b60009182526014602052604090912055565b846daaeb6d7670e522a718067333cd4e3b156121d3576001600160a01b0381163314156121ca5760008481526020819052604090205460ff908116146121855760405162461bcd60e51b8152600401610d6690613d3f565b6001600160a01b0386163314806121a157506121a18633610ba5565b6121bd5760405162461bcd60e51b8152600401610d6690613eb2565b6111528686868686612e3b565b6121d381612729565b60008481526020819052604090205460ff908116146122045760405162461bcd60e51b8152600401610d6690613d3f565b6001600160a01b03861633148061222057506122208633610ba5565b61223c5760405162461bcd60e51b8152600401610d6690613eb2565b6112148686868686612e3b565b612251612a4f565b6001600160a01b0381166122b65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d66565b6122bf81612b44565b50565b6122ca6124b9565b886122e857604051631e1d0ab560e01b815260040160405180910390fd5b8761230657604051631e1d0ab560e01b815260040160405180910390fd5b805161232557604051631e1d0ab560e01b815260040160405180910390fd5b600061232f612f5c565b9050612345338260016017805461135890613cee565b6000818152601b60209081526040909120835161236492850190613448565b5061236f818b61121c565b61237981896118df565b612383818a6113db565b6000818152600d60205260409020805460ff19168815151790556000818152601160209081526040808320805460ff191689151517905560129091529020849055856123d05760016123d3565b60ff5b6000828152602081905260409020805460ff191660ff929092169190911790556123fd8184611926565b612405612f72565b50505050505050505050565b60008381526011602052604081205460ff16151560011461243457506001611690565b8161245257604051631e1d0ab560e01b815260040160405180910390fd5b6000848152601260209081526040808320546001600160a01b0387168452601383528184208885529092529091205461248c908490613e18565b1115949350505050565b61249e6124b9565b6000908152601160205260409020805460ff19166001179055565b6004546001600160a01b031633908114906000906124d6906119a8565b905081806124e15750805b61253f5760405162461bcd60e51b815260206004820152602960248201527f5465616d3a2063616c6c6572206973206e6f7420746865206f776e6572206f726044820152681034b7102a32b0b69760b91b6064820152608401610d66565b5050565b81518351146125a55760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610d66565b6001600160a01b0384166125cb5760405162461bcd60e51b8152600401610d6690613efb565b336125da818787878787612f89565b60005b84518110156126c35760008582815181106125fa576125fa613d29565b60200260200101519050600085838151811061261857612618613d29565b60209081029190910181015160008481526001835260408082206001600160a01b038e1683529093529190912054909150818110156126695760405162461bcd60e51b8152600401610d6690613f40565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906126a8908490613e18565b92505081905550505050806126bc90613d8c565b90506125dd565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612713929190613f8a565b60405180910390a4611214818787878787612fba565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c61711349060440160206040518083038186803b15801561277357600080fd5b505afa158015612787573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127ab9190613e95565b801561283d5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c61711349060440160206040518083038186803b15801561280557600080fd5b505afa158015612819573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061283d9190613e95565b6122bf57604051633b79c77360e21b8152336004820152602401610d66565b60008281526007602052604081205460ff1615156001146128a15761288083610f89565b60008481526008602052604090205461289a908490613e18565b1115611690565b50600192915050565b6001600160a01b03841661290a5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610d66565b3361292a8160008761291b88613125565b61292488613125565b87612f89565b60008481526001602090815260408083206001600160a01b03891684529091528120805485929061295c908490613e18565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611e3381600087878787613170565b60065460ff16612a055760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d66565b6006805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6004546001600160a01b031633146114235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d66565b600f5460405173a9dac8f3aedc55d0fe707b86b8a45d246858d2e19180156108fc02916000818181858888f193505050501580156122bf573d6000803e3d6000fd5b6001600160a01b0382166000908152601360209081526040808320868452909152902054612b1a908290613e18565b6001600160a01b039092166000908152601360209081526040808320958352949052929092205550565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60065460ff1615612bb95760405162461bcd60e51b8152600401610d6690613e30565b6006805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a323390565b4760005b600c5481101561253f57612c6a600a8281548110612c1257612c12613d29565b9060005260206000200160009054906101000a90046001600160a01b03166064600b8481548110612c4557612c45613d29565b906000526020600020015485612c5b9190613df9565b612c659190613e73565b61323a565b80612c7481613d8c565b915050612bf2565b6daaeb6d7670e522a718067333cd4e3b156122bf57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c61711349060440160206040518083038186803b158015612ce457600080fd5b505afa158015612cf8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d1c9190613e95565b6122bf57604051633b79c77360e21b81526001600160a01b0382166004820152602401610d66565b816001600160a01b0316836001600160a01b03161415612db85760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610d66565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600082612e3285846132d0565b14949350505050565b6001600160a01b038416612e615760405162461bcd60e51b8152600401610d6690613efb565b33612e7181878761291b88613125565b60008481526001602090815260408083206001600160a01b038a16845290915290205483811015612eb45760405162461bcd60e51b8152600401610d6690613f40565b60008581526001602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612ef3908490613e18565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612f53828888888888613170565b50505050505050565b60006018546001612f6d9190613e18565b905090565b60188054906000612f8283613d8c565b9190505550565b60065460ff1615612fac5760405162461bcd60e51b8152600401610d6690613e30565b61121486868686868661333c565b6001600160a01b0384163b156112145760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612ffe9089908990889088908890600401613fb8565b602060405180830381600087803b15801561301857600080fd5b505af1925050508015613048575060408051601f3d908101601f1916820190925261304591810190614016565b60015b6130f557613054614033565b806308c379a0141561308e575061306961404f565b806130745750613090565b8060405162461bcd60e51b8152600401610d6691906135a7565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610d66565b6001600160e01b0319811663bc197c8160e01b14612f535760405162461bcd60e51b8152600401610d66906140d8565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061315f5761315f613d29565b602090810291909101015292915050565b6001600160a01b0384163b156112145760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906131b49089908990889088908890600401614120565b602060405180830381600087803b1580156131ce57600080fd5b505af19250505080156131fe575060408051601f3d908101601f191682019092526131fb91810190614016565b60015b61320a57613054614033565b6001600160e01b0319811663f23a6e6160e01b14612f535760405162461bcd60e51b8152600401610d66906140d8565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613287576040519150601f19603f3d011682016040523d82523d6000602084013e61328c565b606091505b50509050806110515760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610d66565b600081815b84518110156116415760008582815181106132f2576132f2613d29565b602002602001015190508083116133185760008381526020829052604090209250613329565b600081815260208490526040902092505b508061333481613d8c565b9150506132d5565b6001600160a01b0385166133c35760005b83518110156133c15782818151811061336857613368613d29565b60200260200101516008600086848151811061338657613386613d29565b6020026020010151815260200190815260200160002060008282546133ab9190613e18565b909155506133ba905081613d8c565b905061334d565b505b6001600160a01b0384166112145760005b8351811015612f53578281815181106133ef576133ef613d29565b60200260200101516008600086848151811061340d5761340d613d29565b6020026020010151815260200190815260200160002060008282546134329190614165565b90915550613441905081613d8c565b90506133d4565b82805461345490613cee565b90600052602060002090601f01602090048101928261347657600085556134bc565b82601f1061348f57805160ff19168380011785556134bc565b828001600101855582156134bc579182015b828111156134bc5782518255916020019190600101906134a1565b506134c89291506134cc565b5090565b5b808211156134c857600081556001016134cd565b80356001600160a01b03811681146134f857600080fd5b919050565b6000806040838503121561351057600080fd5b613519836134e1565b946020939093013593505050565b6001600160e01b0319811681146122bf57600080fd5b60006020828403121561354f57600080fd5b813561169081613527565b6000815180845260005b8181101561358057602081850181015186830182015201613564565b81811115613592576000602083870101525b50601f01601f19169290920160200192915050565b602081526000611690602083018461355a565b6000602082840312156135cc57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561360e5761360e6135d3565b6040525050565b600082601f83011261362657600080fd5b81356001600160401b0381111561363f5761363f6135d3565b604051613656601f8301601f1916602001826135e9565b81815284602083860101111561366b57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561369b57600080fd5b8235915060208301356001600160401b038111156136b857600080fd5b6136c485828601613615565b9150509250929050565b60006001600160401b038211156136e7576136e76135d3565b5060051b60200190565b600082601f83011261370257600080fd5b8135602061370f826136ce565b60405161371c82826135e9565b83815260059390931b850182019282810191508684111561373c57600080fd5b8286015b848110156137575780358352918301918301613740565b509695505050505050565b600080600080600060a0868803121561377a57600080fd5b613783866134e1565b9450613791602087016134e1565b935060408601356001600160401b03808211156137ad57600080fd5b6137b989838a016136f1565b945060608801359150808211156137cf57600080fd5b6137db89838a016136f1565b935060808801359150808211156137f157600080fd5b506137fe88828901613615565b9150509295509295909350565b6000806040838503121561381e57600080fd5b50508035926020909101359150565b60008060006060848603121561384257600080fd5b61384b846134e1565b95602085013595506040909401359392505050565b60006020828403121561387257600080fd5b611690826134e1565b600082601f83011261388c57600080fd5b81356020613899826136ce565b6040516138a682826135e9565b83815260059390931b85018201928281019150868411156138c657600080fd5b8286015b84811015613757576138db816134e1565b83529183019183016138ca565b600080604083850312156138fb57600080fd5b82356001600160401b038082111561391257600080fd5b61391e8683870161387b565b9350602085013591508082111561393457600080fd5b506136c4858286016136f1565b600081518084526020808501945080840160005b8381101561397157815187529582019590820190600101613955565b509495945050505050565b6020815260006116906020830184613941565b600080604083850312156139a257600080fd5b823591506139b2602084016134e1565b90509250929050565b6000806000606084860312156139d057600080fd5b83356001600160401b038111156139e657600080fd5b6139f28682870161387b565b9660208601359650604090950135949350505050565b80151581146122bf57600080fd5b60008060408385031215613a2957600080fd5b823591506020830135613a3b81613a08565b809150509250929050565b60008060408385031215613a5957600080fd5b613a62836134e1565b91506020830135613a3b81613a08565b60008083601f840112613a8457600080fd5b5081356001600160401b03811115613a9b57600080fd5b6020830191508360208260051b8501011115613ab657600080fd5b9250929050565b600080600080600060808688031215613ad557600080fd5b613ade866134e1565b9450602086013593506040860135925060608601356001600160401b03811115613b0757600080fd5b613b1388828901613a72565b969995985093965092949392505050565b60008060008060608587031215613b3a57600080fd5b613b43856134e1565b93506020850135925060408501356001600160401b03811115613b6557600080fd5b613b7187828801613a72565b95989497509550505050565b60008060408385031215613b9057600080fd5b613b99836134e1565b91506139b2602084016134e1565b600080600080600060a08688031215613bbf57600080fd5b613bc8866134e1565b9450613bd6602087016134e1565b9350604086013592506060860135915060808601356001600160401b03811115613bff57600080fd5b6137fe88828901613615565b60008060008060008060008060006101208a8c031215613c2a57600080fd5b8935985060208a0135975060408a0135965060608a0135613c4a81613a08565b955060808a0135613c5a81613a08565b945060a08a0135613c6a81613a08565b935060c08a0135925060e08a0135613c8181613a08565b91506101008a01356001600160401b03811115613c9d57600080fd5b613ca98c828d01613615565b9150509295985092959850929598565b600080600060608486031215613cce57600080fd5b83359250613cde602085016134e1565b9150604084013590509250925092565b600181811c90821680613d0257607f821691505b60208210811415613d2357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60208082526017908201527f546f6b656e206973206e6f7420747261646561626c6521000000000000000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613da057613da0613d76565b5060010190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6000816000190483118215151615613e1357613e13613d76565b500290565b60008219821115613e2b57613e2b613d76565b500190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b600060208284031215613e6c57600080fd5b5051919050565b600082613e9057634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215613ea757600080fd5b815161169081613a08565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000613f9d6040830185613941565b8281036020840152613faf8185613941565b95945050505050565b6001600160a01b0386811682528516602082015260a060408201819052600090613fe490830186613941565b8281036060840152613ff68186613941565b9050828103608084015261400a818561355a565b98975050505050505050565b60006020828403121561402857600080fd5b815161169081613527565b600060033d111561404c5760046000803e5060005160e01c5b90565b600060443d101561405d5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561408c57505050505090565b82850191508151818111156140a45750505050505090565b843d87010160208285010111156140be5750505050505090565b6140cd602082860101876135e9565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061415a9083018461355a565b979650505050505050565b60008282101561417757614177613d76565b50039056fe68747470733a2f2f6d657461646174612e6d696e74706c65782e78797a2f744f6845546d5a4252316f726c764179766b63322f636f6e74726163742d6d65746164617461a2646970667358221220cd405c1e3fbd61c8704ff76a321e3a586c7fb65548a4abcb6b51f5cdc39d0aa464736f6c63430008090033
Verified Source Code Partial Match
Compiler: v0.8.9+commit.e5eed63a
EVM: london
Optimization: Yes (200 runs)
GamedevVr3DmodelsContract.sol 2050 lines
//*********************************************************************//
//*********************************************************************//
//
// _____ __ ____ _ _____ ____ ___ __ __
// / ___/__ ___ _ ___ ___/ /__ _ __ / __/___ | | / / _ \ |_ // _ \ __ _ ___ ___/ /__ / /__
// / (_ / _ `/ ' \/ -_) _ / -_) |/ / > _/_ _/ | |/ / , _/ _/_ </ // / / ' \/ _ \/ _ / -_) (_-<
// \___/\_,_/_/_/_/\__/\_,_/\__/|___/ |_____/ |___/_/|_| /____/____/ /_/_/_/\___/\_,_/\__/_/___/
//
//
//*********************************************************************//
//*********************************************************************//
//-------------DEPENDENCIES--------------------------//
// 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/security/Pausable.sol
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers whenNotPaused and whenPaused, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by account.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by account.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
// 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.
*/
function _onlyOwner() private view {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
modifier onlyOwner() {
_onlyOwner();
_;
}
/**
* @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/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/ERC1155/IERC1155Receiver.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)
pragma solidity ^0.8.0;
/**
* @dev _Available since v3.1._
*/
interface IERC1155Receiver is IERC165 {
/**
@dev Handles the receipt of a single ERC1155 token type. This function is
called at the end of a safeTransferFrom after the balance has been updated.
To accept the transfer, this must return
bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))
(i.e. 0xf23a6e61, or its own function selector).
@param operator The address which initiated the transfer (i.e. msg.sender)
@param from The address which previously owned the token
@param id The ID of the token being transferred
@param value The amount of tokens being transferred
@param data Additional data with no specified format
@return bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)")) if transfer is allowed
*/
function onERC1155Received(
address operator,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external returns (bytes4);
/**
@dev Handles the receipt of a multiple ERC1155 token types. This function
is called at the end of a safeBatchTransferFrom after the balances have
been updated. To accept the transfer(s), this must return
bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))
(i.e. 0xbc197c81, or its own function selector).
@param operator The address which initiated the batch transfer (i.e. msg.sender)
@param from The address which previously owned the token
@param ids An array containing ids of each token being transferred (order and length must match values array)
@param values An array containing amounts of each token being transferred (order and length must match ids array)
@param data Additional data with no specified format
@return bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)")) if transfer is allowed
*/
function onERC1155BatchReceived(
address operator,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external returns (bytes4);
}
// File: @openzeppelin/contracts/token/ERC1155/IERC1155.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)
pragma solidity ^0.8.0;
/**
* @dev Required interface of an ERC1155 compliant contract, as defined in the
* https://eips.ethereum.org/EIPS/eip-1155[EIP].
*
* _Available since v3.1._
*/
interface IERC1155 is IERC165 {
/**
* @dev Emitted when value tokens of token type id are transferred from from to to by operator.
*/
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
/**
* @dev Equivalent to multiple {TransferSingle} events, where operator, from and to are the same for all
* transfers.
*/
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
/**
* @dev Emitted when account grants or revokes permission to operator to transfer their tokens, according to
* approved.
*/
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
/**
* @dev Emitted when the URI for token type id changes to value, if it is a non-programmatic URI.
*
* If an {URI} event was emitted for id, the standard
* https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that value will equal the value
* returned by {IERC1155MetadataURI-uri}.
*/
event URI(string value, uint256 indexed id);
/**
* @dev Returns the amount of tokens of token type id owned by account.
*
* Requirements:
*
* - account cannot be the zero address.
*/
function balanceOf(address account, uint256 id) external view returns (uint256);
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
*
* Requirements:
*
* - accounts and ids must have the same length.
*/
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
/**
* @dev Grants or revokes permission to operator to transfer the caller's tokens, according to approved,
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - operator cannot be the caller.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns true if operator is approved to transfer account's tokens.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address account, address operator) external view returns (bool);
/**
* @dev Transfers amount tokens of token type id from from to to.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - to cannot be the zero address.
* - If the caller is not from, it must be have been approved to spend from's tokens via {setApprovalForAll}.
* - from must have a balance of tokens of type id of at least amount.
* - If to refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - ids and amounts must have the same length.
* - If to refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
}
// File: @openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the optional ERC1155MetadataExtension interface, as defined
* in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
*
* _Available since v3.1._
*/
interface IERC1155MetadataURI is IERC1155 {
/**
* @dev Returns the URI for token type id.
*
* If the {id} substring is present in the URI, it must be replaced by
* clients with the actual token type ID.
*/
function uri(uint256 id) external view returns (string memory);
}
// File contracts/OperatorFilter/IOperatorFilterRegistry.sol
pragma solidity ^0.8.9;
interface IOperatorFilterRegistry {
function isOperatorAllowed(address registrant, address operator) external view returns (bool);
function register(address registrant) external;
function registerAndSubscribe(address registrant, address subscription) external;
function registerAndCopyEntries(address registrant, address registrantToCopy) external;
function updateOperator(address registrant, address operator, bool filtered) external;
function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
function subscribe(address registrant, address registrantToSubscribe) external;
function unsubscribe(address registrant, bool copyExistingEntries) external;
function subscriptionOf(address addr) external returns (address registrant);
function subscribers(address registrant) external returns (address[] memory);
function subscriberAt(address registrant, uint256 index) external returns (address);
function copyEntriesOf(address registrant, address registrantToCopy) external;
function isOperatorFiltered(address registrant, address operator) external returns (bool);
function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
function filteredOperators(address addr) external returns (address[] memory);
function filteredCodeHashes(address addr) external returns (bytes32[] memory);
function filteredOperatorAt(address registrant, uint256 index) external returns (address);
function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
function isRegistered(address addr) external returns (bool);
function codeHashOf(address addr) external returns (bytes32);
}
// File contracts/OperatorFilter/OperatorFilterer.sol
pragma solidity ^0.8.9;
abstract contract OperatorFilterer {
error OperatorNotAllowed(address operator);
IOperatorFilterRegistry constant operatorFilterRegistry =
IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);
constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
// If an inheriting token contract is deployed to a network without the registry deployed, the modifier
// will not revert, but the contract will need to be registered with the registry once it is deployed in
// order for the modifier to filter addresses.
if (address(operatorFilterRegistry).code.length > 0) {
if (subscribe) {
operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
} else {
if (subscriptionOrRegistrantToCopy != address(0)) {
operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
} else {
operatorFilterRegistry.register(address(this));
}
}
}
}
function _onlyAllowedOperator(address from) private view {
if (
!(
operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender)
&& operatorFilterRegistry.isOperatorAllowed(address(this), from)
)
) {
revert OperatorNotAllowed(msg.sender);
}
}
modifier onlyAllowedOperator(address from) virtual {
// Check registry code length to facilitate testing in environments without a deployed registry.
if (address(operatorFilterRegistry).code.length > 0) {
// Allow spending tokens from addresses with balance
// Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
// from an EOA.
if (from == msg.sender) {
_;
return;
}
_onlyAllowedOperator(from);
}
_;
}
modifier onlyAllowedOperatorApproval(address operator) virtual {
_checkFilterOperator(operator);
_;
}
function _checkFilterOperator(address operator) internal view virtual {
// Check registry code length to facilitate testing in environments without a deployed registry.
if (address(operatorFilterRegistry).code.length > 0) {
if (!operatorFilterRegistry.isOperatorAllowed(address(this), operator)) {
revert OperatorNotAllowed(operator);
}
}
}
}
// File: @openzeppelin/contracts/token/ERC1155/ERC1155.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/
abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI , OperatorFilterer {
using Address for address;
// Mapping for token ID that are not able to traded
// For reasons mapping to uint8 instead of boolean
// so 1 = false and 255 = true
mapping (uint256 => uint8) tokenTradingStatus;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
// Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
string private _uri;
/**
* @dev See {_setURI}.
*/
constructor(string memory uri_) {
_setURI(uri_);
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC1155).interfaceId ||
interfaceId == type(IERC1155MetadataURI).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC1155MetadataURI-uri}.
*
* This implementation returns the same URI for *all* token types. It relies
* on the token type ID substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* Clients calling this function must replace the {id} substring with the
* actual token type ID.
*/
function uri(uint256) public view virtual override returns (string memory) {
return _uri;
}
/**
* @dev See {IERC1155-balanceOf}.
*
* Requirements:
*
* - account cannot be the zero address.
*/
function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
require(account != address(0), "ERC1155: balance query for the zero address");
return _balances[id][account];
}
/**
* @dev See {IERC1155-balanceOfBatch}.
*
* Requirements:
*
* - accounts and ids must have the same length.
*/
function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
public
view
virtual
override
returns (uint256[] memory)
{
require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");
uint256[] memory batchBalances = new uint256[](accounts.length);
for (uint256 i = 0; i < accounts.length; ++i) {
batchBalances[i] = balanceOf(accounts[i], ids[i]);
}
return batchBalances;
}
/**
* @dev See {IERC1155-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override onlyAllowedOperatorApproval(operator) {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC1155-isApprovedForAll}.
*/
function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
return _operatorApprovals[account][operator];
}
/**
* @dev See {IERC1155-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) public virtual override onlyAllowedOperator(from) {
require(tokenTradingStatus[id] == 255, "Token is not tradeable!");
require(
from == _msgSender() || isApprovedForAll(from, _msgSender()),
"ERC1155: caller is not owner nor approved"
);
_safeTransferFrom(from, to, id, amount, data);
}
/**
* @dev See {IERC1155-safeBatchTransferFrom}.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual override onlyAllowedOperator(from) {
for (uint256 i = 0; i < ids.length; ++i) {
require(tokenTradingStatus[ids[i]] == 255, "Token is not tradeable!");
}
require(
from == _msgSender() || isApprovedForAll(from, _msgSender()),
"ERC1155: transfer caller is not owner nor approved"
);
_safeBatchTransferFrom(from, to, ids, amounts, data);
}
/**
* @dev Transfers amount tokens of token type id from from to to.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - to cannot be the zero address.
* - from must have a balance of tokens of type id of at least amount.
* - If to refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function _safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: transfer to the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
unchecked {
_balances[id][from] = fromBalance - amount;
}
_balances[id][to] += amount;
emit TransferSingle(operator, from, to, id, amount);
_doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - If to refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function _safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
require(to != address(0), "ERC1155: transfer to the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, from, to, ids, amounts, data);
for (uint256 i = 0; i < ids.length; ++i) {
uint256 id = ids[i];
uint256 amount = amounts[i];
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
unchecked {
_balances[id][from] = fromBalance - amount;
}
_balances[id][to] += amount;
}
emit TransferBatch(operator, from, to, ids, amounts);
_doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
}
/**
* @dev Sets a new URI for all token types, by relying on the token type ID
* substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* By this mechanism, any occurrence of the {id} substring in either the
* URI or any of the amounts in the JSON file at said URI will be replaced by
* clients with the token type ID.
*
* For example, the https://token-cdn-domain/{id}.json URI would be
* interpreted by clients as
* https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json
* for token type ID 0x4cce0.
*
* See {uri}.
*
* Because these URIs cannot be meaningfully represented by the {URI} event,
* this function emits no events.
*/
function _setURI(string memory newuri) internal virtual {
_uri = newuri;
}
/**
* @dev Creates amount tokens of token type id, and assigns them to to.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - to cannot be the zero address.
* - If to refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function _mint(
address to,
uint256 id,
uint256 amount,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: mint to the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);
_balances[id][to] += amount;
emit TransferSingle(operator, address(0), to, id, amount);
_doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
*
* Requirements:
*
* - ids and amounts must have the same length.
* - If to refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function _mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: mint to the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operator = _msgSender();
_beforeTokenTransfer(operator, address(0), to, ids, amounts, data);
for (uint256 i = 0; i < ids.length; i++) {
_balances[ids[i]][to] += amounts[i];
}
emit TransferBatch(operator, address(0), to, ids, amounts);
_doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
}
/**
* @dev Destroys amount tokens of token type id from from
*
* Requirements:
*
* - from cannot be the zero address.
* - from must have at least amount tokens of token type id.
*/
function _burn(
address from,
uint256 id,
uint256 amount
) internal virtual {
require(from != address(0), "ERC1155: burn from the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
unchecked {
_balances[id][from] = fromBalance - amount;
}
emit TransferSingle(operator, from, address(0), id, amount);
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
*
* Requirements:
*
* - ids and amounts must have the same length.
*/
function _burnBatch(
address from,
uint256[] memory ids,
uint256[] memory amounts
) internal virtual {
require(from != address(0), "ERC1155: burn from the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operator = _msgSender();
_beforeTokenTransfer(operator, from, address(0), ids, amounts, "");
for (uint256 i = 0; i < ids.length; i++) {
uint256 id = ids[i];
uint256 amount = amounts[i];
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
unchecked {
_balances[id][from] = fromBalance - amount;
}
}
emit TransferBatch(operator, from, address(0), ids, amounts);
}
/**
* @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, "ERC1155: setting approval status for self");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning, as well as batched variants.
*
* The same hook is called on both single and batched variants. For single
* transfers, the length of the id and amount arrays will be 1.
*
* Calling conditions (for each id and amount pair):
*
* - When from and to are both non-zero, amount of from's tokens
* of token type id will be transferred to to.
* - When from is zero, amount tokens of token type id will be minted
* for to.
* - when to is zero, amount of from's tokens of token type id
* will be burned.
* - from and to are never both zero.
* - ids and amounts have the same, non-zero length.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {}
function _doSafeTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) private {
if (to.isContract()) {
try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
if (response != IERC1155Receiver.onERC1155Received.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
revert(reason);
} catch {
revert("ERC1155: transfer to non ERC1155Receiver implementer");
}
}
}
function _doSafeBatchTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) private {
if (to.isContract()) {
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
bytes4 response
) {
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
revert(reason);
} catch {
revert("ERC1155: transfer to non ERC1155Receiver implementer");
}
}
}
function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
uint256[] memory array = new uint256[](1);
array[0] = element;
return array;
}
}
//-------------END DEPENDENCIES------------------------//
error TokenDoesNotExist();
error CannotModifyOpenEditonSupply();
error NewSupplyMustExceedPrevious();
error MintZeroQuantity();
error CapExceeded();
error InvalidPayment();
error ExceededTransactionMints();
error ExceededMints();
error CannotBeZero();
error NoStateChange();
error PublicMintClosed();
error AllowlistMintClosed();
error NotInAllowlist();
error CannotBeNullAddress();
error ClaimModeDisabled();
error IneligibleRedemptionContract();
error TokenRedemptionBalanceExhausted();
error InsufficentTokenBalance();
error InvalidApprovalForRedemption();
error CannotEnableBothRedeemModes();
error NotMaintainer();
// Rampp Contracts v2.1 (Teams.sol)
error InvalidTeamAddress();
error DuplicateTeamAddress();
pragma solidity ^0.8.0;
/**
* Teams is a contract implementation to extend upon Ownable that allows multiple controllers
* of a single contract to modify specific mint settings but not have overall ownership of the contract.
* This will easily allow cross-collaboration via Mintplex.xyz.
**/
abstract contract Teams is Ownable{
mapping (address => bool) internal team;
/**
* @dev Adds an address to the team. Allows them to execute protected functions
* @param _address the ETH address to add, cannot be 0x and cannot be in team already
**/
function addToTeam(address _address) public onlyOwner {
if(_address == address(0)) revert InvalidTeamAddress();
if(inTeam(_address)) revert DuplicateTeamAddress();
team[_address] = true;
}
/**
* @dev Removes an address to the team.
* @param _address the ETH address to remove, cannot be 0x and must be in team
**/
function removeFromTeam(address _address) public onlyOwner {
if(_address == address(0)) revert InvalidTeamAddress();
if(!inTeam(_address)) revert InvalidTeamAddress();
team[_address] = false;
}
/**
* @dev Check if an address is valid and active in the team
* @param _address ETH address to check for truthiness
**/
function inTeam(address _address)
public
view
returns (bool)
{
if(_address == address(0)) revert InvalidTeamAddress();
return team[_address] == true;
}
/**
* @dev Throws if called by any account other than the owner or team member.
*/
function _onlyTeamOrOwner() private view {
bool _isOwner = owner() == _msgSender();
bool _isTeam = inTeam(_msgSender());
require(_isOwner || _isTeam, "Team: caller is not the owner or in Team.");
}
modifier onlyTeamOrOwner() {
_onlyTeamOrOwner();
_;
}
}
// File: OpenEditionSupport.sol
abstract contract OpenEditionSupport is Teams {
mapping (uint256 => bool) private openEditionEnabled;
/**
* @dev Check if a token ID is in open edition mode. meaning that the current minted count == total supply
* @param _tokenId the token ID to check against
*/
function isOpenEdition(uint256 _tokenId) public view returns (bool) {
return openEditionEnabled[_tokenId] == true;
}
/**
* @dev Update if a token is in Open Edition mode or not.
* @param _tokenId the token ID to check against
* @param _isOpenEdition true|false for new setting for token.
*/
function setOpenEditionMode(uint256 _tokenId, bool _isOpenEdition) public onlyTeamOrOwner {
openEditionEnabled[_tokenId] = _isOpenEdition;
}
}
// File: @openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Supply.sol)
pragma solidity ^0.8.0;
/**
* @dev Extension of ERC1155 that adds tracking of total supply per id.
*
* Useful for scenarios where Fungible and Non-fungible tokens have to be
* clearly identified. Note: While a totalSupply of 1 might mean the
* corresponding is an NFT, there is no guarantees that no other token with the
* same id are not going to be minted.
*/
abstract contract ERC1155Supply is ERC1155, Teams, OpenEditionSupport {
mapping (uint256 => uint256) private _totalSupply;
mapping (uint256 => uint256) private tokenSupplyCap;
/**
* @dev Total amount of tokens in with a given id.
*/
function totalSupply(uint256 _id) public view virtual returns (uint256) {
return _totalSupply[_id];
}
/**
* @dev Helper function to check if tokenId and qty is within supply cap for token.
* If OpenEdition enabled - short circuit to true since cap == minted amt
* @param _id the token ID to check against
* @param _qtyToMint the amount of tokens to be minted
*/
function withinSupplyCap(uint256 _id, uint256 _qtyToMint) internal view returns(bool) {
return isOpenEdition(_id) ? true : ((totalSupply(_id) + _qtyToMint) <= getTokenSupplyCap(_id));
}
function getTokenSupplyCap(uint256 _id) public view virtual returns (uint256) {
if(!exists(_id)) revert To...
// [truncated — 72550 bytes total]
Read Contract
CONTRACT_VERSION 0x38b90333 → uint8
PROVIDER_FEE 0xf623bb8b → uint256
balanceOf 0x00fdd58e → uint256
balanceOfBatch 0x4e1273f4 → uint256[]
canMintAmount 0xfc2f3832 → bool
contractURI 0xe8a3d485 → string
currentMintCount 0x4e5298a0 → uint256
currentTokenID 0xbb62115e → uint256
exists 0x4f558e79 → bool
getPrice 0x5cf4ee91 → uint256
getPriceForToken 0x4d09ae6d → uint256
getTokenSupplyCap 0x143727c9 → uint256
getTransactionCapForToken 0x9e490e24 → uint256
inAllowlistMode 0xeb238e81 → bool
inTeam 0xa1af10ca → bool
isAllowlisted 0xd2de022f → bool
isApprovedForAll 0xe985e9c5 → bool
isMintingOpen 0x83e083c3 → bool
isOpenEdition 0xbec0904b → bool
isTokenTradeable 0x134902fd → bool
isWalletCapEnabled 0x736e04fa → bool
merkleRootForToken 0x8c04b8e9 → bytes32
name 0x06fdde03 → string
onlyAllowlistMode 0xe6c6990a → bool
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
payableAddressCount 0x3e07311c → uint256
payableAddresses 0x891bbe73 → address
payableFees 0x286c8137 → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenWalletCap 0x4bf4e087 → uint256
totalSupply 0xbd85b039 → uint256
uri 0x0e89341c → string
Write Contract 33 functions
These functions modify contract state and require a wallet transaction to execute.
addToTeam 0x43696f18
address _address
closeMinting 0x628d35c9
uint256 _id
createToken 0xf7436e37
uint256 _tokenSupplyCap
uint256 _tokenTransactionCap
uint256 _tokenFeeInWei
bool _isOpenDefaultStatus
bool _allowTradingDefaultStatus
bool _enableWalletCap
uint256 _walletCap
bool _isOpenEdition
string _tokenURI
disableAllowlistOnlyMode 0x6586375b
uint256 _id
disableWalletCap 0xe82da691
uint256 _id
enableAllowlistOnlyMode 0xbc1f0ab5
uint256 _id
enableWalletCap 0xfe6d3cc8
uint256 _id
mintManyAdmin 0x6c6acd4d
address[] addresses
uint256 _id
uint256 _qtyToEach
mintToAdmin 0x38df41ac
address _address
uint256 _id
uint256 _qty
mintToMultiple 0x6af3ef58
address _to
uint256 _id
uint256 _qty
mintToMultipleAL 0xbb6074e0
address _to
uint256 _id
uint256 _qty
bytes32[] _merkleProof
openMinting 0x9b192647
uint256 _id
pause 0x8456cb59
No parameters
removeFromTeam 0xdfdedf69
address _address
renounceOwnership 0x715018a6
No parameters
resetMints 0xac80746a
uint256 _id
address _address
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
setOpenEditionMode 0x869e9a00
uint256 _tokenId
bool _isOpenEdition
setPriceForToken 0x7aa9c33f
uint256 _id
uint256 _feeInWei
setProviderFee 0xa7593fb7
uint256 _fee
setTokenSupplyCap 0x3832e870
uint256 _id
uint256 _newSupplyCap
setTokenTradeable 0x4790c925
uint256 tokenId
setTokenURI 0x162094c4
uint256 _id
string _newTokenURI
setTokenUntradeable 0xeec8e908
uint256 tokenId
setTokenWalletMax 0xd8800f94
uint256 _id
uint256 _newMax
setTransactionCapForToken 0x3e511168
uint256 _id
uint256 _transactionCap
transferOwnership 0xf2fde38b
address newOwner
unpause 0x3f4ba83a
No parameters
updateMerkleRoot 0xf1e33115
uint256 _id
bytes32 _newMerkleRoot
withdrawAll 0x853828b6
No parameters
withdrawAllERC20 0xb40ebceb
address _tokenContract
uint256 _amount
Recent Transactions
No transactions found for this address