Address Contract Partially Verified
Address
0xFc599783f1164155C60108a3b303Ce2f79CbA07d
Balance
0 ETH
Nonce
1
Code Size
15456 bytes
Creator
0x1D6dE76b...Ac5D at tx 0xb7a1a187...44c68b
Indexed Transactions
0
Contract Bytecode
15456 bytes
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80636352211e11610104578063a8691a3a116100a2578063c6ab67a311610071578063c6ab67a3146104f2578063c87b56dd14610510578063e985e9c514610540578063f2fde38b14610570576101cf565b8063a8691a3a1461046c578063ae0b51df1461048a578063b88d4fde146104a6578063c503b18a146104c2576101cf565b8063715018a6116100de578063715018a61461040a5780638da5cb5b1461041457806395d89b4114610432578063a22cb46514610450576101cf565b80636352211e1461038c5780636c0360eb146103bc57806370a08231146103da576101cf565b806323b872dd116101715780633732ad1c1161014b5780633732ad1c1461031a57806342842e0e1461033857806342966c681461035457806355f804b314610370576101cf565b806323b872dd146102c457806330ea4199146102e0578063326f9ad3146102fc576101cf565b8063095ea7b3116101ad578063095ea7b314610252578063109695231461026e57806315bdebe21461028a57806318160ddd146102a6576101cf565b806301ffc9a7146101d457806306fdde0314610204578063081812fc14610222575b600080fd5b6101ee60048036038101906101e99190612867565b61058c565b6040516101fb9190612ecd565b60405180910390f35b61020c61066e565b6040516102199190612f03565b60405180910390f35b61023c6004803603810190610237919061290a565b610700565b6040516102499190612e66565b60405180910390f35b61026c600480360381019061026791906127cd565b610785565b005b610288600480360381019061028391906128c1565b61089d565b005b6102a4600480360381019061029f919061283a565b610933565b005b6102ae6109b9565b6040516102bb91906131c5565b60405180910390f35b6102de60048036038101906102d991906126b7565b6109ca565b005b6102fa60048036038101906102f5919061280d565b610a2a565b005b610304610ac3565b6040516103119190612ee8565b60405180910390f35b610322610ac9565b60405161032f9190612ecd565b60405180910390f35b610352600480360381019061034d91906126b7565b610adc565b005b61036e6004803603810190610369919061290a565b610afc565b005b61038a600480360381019061038591906128c1565b610b58565b005b6103a660048036038101906103a1919061290a565b610bee565b6040516103b39190612e66565b60405180910390f35b6103c4610ca0565b6040516103d19190612f03565b60405180910390f35b6103f460048036038101906103ef919061264a565b610d2e565b60405161040191906131c5565b60405180910390f35b610412610de6565b005b61041c610e6e565b6040516104299190612e66565b60405180910390f35b61043a610e98565b6040516104479190612f03565b60405180910390f35b61046a6004803603810190610465919061278d565b610f2a565b005b610474610f40565b60405161048191906131c5565b60405180910390f35b6104a4600480360381019061049f9190612937565b610f64565b005b6104c060048036038101906104bb919061270a565b611201565b005b6104dc60048036038101906104d7919061264a565b611263565b6040516104e991906131c5565b60405180910390f35b6104fa61127b565b6040516105079190612f03565b60405180910390f35b61052a6004803603810190610525919061290a565b611309565b6040516105379190612f03565b60405180910390f35b61055a60048036038101906105559190612677565b611385565b6040516105679190612ecd565b60405180910390f35b61058a6004803603810190610585919061264a565b611419565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061065757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610667575061066682611511565b5b9050919050565b60606000805461067d9061343a565b80601f01602080910402602001604051908101604052809291908181526020018280546106a99061343a565b80156106f65780601f106106cb576101008083540402835291602001916106f6565b820191906000526020600020905b8154815290600101906020018083116106d957829003601f168201915b5050505050905090565b600061070b8261157b565b61074a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610741906130e5565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061079082610bee565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610801576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f890613125565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166108206115e7565b73ffffffffffffffffffffffffffffffffffffffff16148061084f575061084e816108496115e7565b611385565b5b61088e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088590613045565b60405180910390fd5b61089883836115ef565b505050565b6108a56115e7565b73ffffffffffffffffffffffffffffffffffffffff166108c3610e6e565b73ffffffffffffffffffffffffffffffffffffffff1614610919576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091090613105565b60405180910390fd5b806009908051906020019061092f9291906123f3565b5050565b61093b6115e7565b73ffffffffffffffffffffffffffffffffffffffff16610959610e6e565b73ffffffffffffffffffffffffffffffffffffffff16146109af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a690613105565b60405180910390fd5b80600b8190555050565b60006109c560076116a8565b905090565b6109db6109d56115e7565b826116b6565b610a1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1190613145565b60405180910390fd5b610a25838383611794565b505050565b610a326115e7565b73ffffffffffffffffffffffffffffffffffffffff16610a50610e6e565b73ffffffffffffffffffffffffffffffffffffffff1614610aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9d90613105565b60405180910390fd5b80600a60006101000a81548160ff02191690831515021790555050565b600b5481565b600a60009054906101000a900460ff1681565b610af783838360405180602001604052806000815250611201565b505050565b610b0d610b076115e7565b826116b6565b610b4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4390613185565b60405180910390fd5b610b55816119fb565b50565b610b606115e7565b73ffffffffffffffffffffffffffffffffffffffff16610b7e610e6e565b73ffffffffffffffffffffffffffffffffffffffff1614610bd4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bcb90613105565b60405180910390fd5b8060089080519060200190610bea9291906123f3565b5050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8e906130a5565b60405180910390fd5b80915050919050565b60088054610cad9061343a565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd99061343a565b8015610d265780601f10610cfb57610100808354040283529160200191610d26565b820191906000526020600020905b815481529060010190602001808311610d0957829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9690613085565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610dee6115e7565b73ffffffffffffffffffffffffffffffffffffffff16610e0c610e6e565b73ffffffffffffffffffffffffffffffffffffffff1614610e62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5990613105565b60405180910390fd5b610e6c6000611b18565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060018054610ea79061343a565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed39061343a565b8015610f205780601f10610ef557610100808354040283529160200191610f20565b820191906000526020600020905b815481529060010190602001808311610f0357829003601f168201915b5050505050905090565b610f3c610f356115e7565b8383611bde565b5050565b7f000000000000000000000000000000000000000000000000000000000000270f81565b600a60009054906101000a900460ff16610fb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610faa906131a5565b60405180910390fd5b837f000000000000000000000000000000000000000000000000000000000000270f81610fe060076116a8565b610fea91906132bf565b111561102b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102290612f25565b60405180910390fd5b8282600b54866110a5848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505083338460405160200161108a929190612e16565b60405160208183030381529060405280519060200120611d4b565b6110e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110db90613005565b60405180910390fd5b6000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050888a8261113591906132bf565b1115611176576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116d90613165565b60405180910390fd5b898161118291906132bf565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060005b8a8110156111f4576111e1336111dc611d62565b611d7d565b80806111ec9061349d565b9150506111c8565b5050505050505050505050565b61121261120c6115e7565b836116b6565b611251576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124890613145565b60405180910390fd5b61125d84848484611d9b565b50505050565b600c6020528060005260406000206000915090505481565b600980546112889061343a565b80601f01602080910402602001604051908101604052809291908181526020018280546112b49061343a565b80156113015780601f106112d657610100808354040283529160200191611301565b820191906000526020600020905b8154815290600101906020018083116112e457829003601f168201915b505050505081565b60606113148261157b565b611353576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134a90613065565b60405180910390fd5b600861135e83611df7565b60405160200161136f929190612e42565b6040516020818303038152906040529050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6114216115e7565b73ffffffffffffffffffffffffffffffffffffffff1661143f610e6e565b73ffffffffffffffffffffffffffffffffffffffff1614611495576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148c90613105565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611505576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114fc90612f65565b60405180910390fd5b61150e81611b18565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661166283610bee565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081600001549050919050565b60006116c18261157b565b611700576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f790613025565b60405180910390fd5b600061170b83610bee565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061177a57508373ffffffffffffffffffffffffffffffffffffffff1661176284610700565b73ffffffffffffffffffffffffffffffffffffffff16145b8061178b575061178a8185611385565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166117b482610bee565b73ffffffffffffffffffffffffffffffffffffffff161461180a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180190612f85565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561187a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187190612fc5565b60405180910390fd5b611885838383611f58565b6118906000826115ef565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546118e09190613346565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461193791906132bf565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46119f6838383611f5d565b505050565b6000611a0682610bee565b9050611a1481600084611f58565b611a1f6000836115ef565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a6f9190613346565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611b1481600084611f5d565b5050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4490612fe5565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611d3e9190612ecd565b60405180910390a3505050565b600082611d588584611f62565b1490509392505050565b6000611d6e6007611fd7565b611d7860076116a8565b905090565b611d97828260405180602001604052806000815250611fed565b5050565b611da6848484611794565b611db284848484612048565b611df1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611de890612f45565b60405180910390fd5b50505050565b60606000821415611e3f576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611f53565b600082905060005b60008214611e71578080611e5a9061349d565b915050600a82611e6a9190613315565b9150611e47565b60008167ffffffffffffffff811115611e8d57611e8c613601565b5b6040519080825280601f01601f191660200182016040528015611ebf5781602001600182028036833780820191505090505b5090505b60008514611f4c57600182611ed89190613346565b9150600a85611ee79190613514565b6030611ef391906132bf565b60f81b818381518110611f0957611f086135d2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85611f459190613315565b9450611ec3565b8093505050505b919050565b505050565b505050565b60008082905060005b8451811015611fcc576000858281518110611f8957611f886135d2565b5b60200260200101519050808311611fab57611fa483826121df565b9250611fb8565b611fb581846121df565b92505b508080611fc49061349d565b915050611f6b565b508091505092915050565b6001816000016000828254019250508190555050565b611ff783836121f6565b6120046000848484612048565b612043576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161203a90612f45565b60405180910390fd5b505050565b60006120698473ffffffffffffffffffffffffffffffffffffffff166123d0565b156121d2578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026120926115e7565b8786866040518563ffffffff1660e01b81526004016120b49493929190612e81565b602060405180830381600087803b1580156120ce57600080fd5b505af19250505080156120ff57506040513d601f19601f820116820180604052508101906120fc9190612894565b60015b612182573d806000811461212f576040519150601f19603f3d011682016040523d82523d6000602084013e612134565b606091505b5060008151141561217a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217190612f45565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506121d7565b600190505b949350505050565b600082600052816020526040600020905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612266576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225d906130c5565b60405180910390fd5b61226f8161157b565b156122af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122a690612fa5565b60405180910390fd5b6122bb60008383611f58565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461230b91906132bf565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46123cc60008383611f5d565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b8280546123ff9061343a565b90600052602060002090601f0160209004810192826124215760008555612468565b82601f1061243a57805160ff1916838001178555612468565b82800160010185558215612468579182015b8281111561246757825182559160200191906001019061244c565b5b5090506124759190612479565b5090565b5b8082111561249257600081600090555060010161247a565b5090565b60006124a96124a484613205565b6131e0565b9050828152602081018484840111156124c5576124c461363f565b5b6124d08482856133f8565b509392505050565b60006124eb6124e684613236565b6131e0565b9050828152602081018484840111156125075761250661363f565b5b6125128482856133f8565b509392505050565b60008135905061252981613bb7565b92915050565b60008083601f84011261254557612544613635565b5b8235905067ffffffffffffffff81111561256257612561613630565b5b60208301915083602082028301111561257e5761257d61363a565b5b9250929050565b60008135905061259481613bce565b92915050565b6000813590506125a981613be5565b92915050565b6000813590506125be81613bfc565b92915050565b6000815190506125d381613bfc565b92915050565b600082601f8301126125ee576125ed613635565b5b81356125fe848260208601612496565b91505092915050565b600082601f83011261261c5761261b613635565b5b813561262c8482602086016124d8565b91505092915050565b60008135905061264481613c13565b92915050565b6000602082840312156126605761265f613649565b5b600061266e8482850161251a565b91505092915050565b6000806040838503121561268e5761268d613649565b5b600061269c8582860161251a565b92505060206126ad8582860161251a565b9150509250929050565b6000806000606084860312156126d0576126cf613649565b5b60006126de8682870161251a565b93505060206126ef8682870161251a565b925050604061270086828701612635565b9150509250925092565b6000806000806080858703121561272457612723613649565b5b60006127328782880161251a565b94505060206127438782880161251a565b935050604061275487828801612635565b925050606085013567ffffffffffffffff81111561277557612774613644565b5b612781878288016125d9565b91505092959194509250565b600080604083850312156127a4576127a3613649565b5b60006127b28582860161251a565b92505060206127c385828601612585565b9150509250929050565b600080604083850312156127e4576127e3613649565b5b60006127f28582860161251a565b925050602061280385828601612635565b9150509250929050565b60006020828403121561282357612822613649565b5b600061283184828501612585565b91505092915050565b6000602082840312156128505761284f613649565b5b600061285e8482850161259a565b91505092915050565b60006020828403121561287d5761287c613649565b5b600061288b848285016125af565b91505092915050565b6000602082840312156128aa576128a9613649565b5b60006128b8848285016125c4565b91505092915050565b6000602082840312156128d7576128d6613649565b5b600082013567ffffffffffffffff8111156128f5576128f4613644565b5b61290184828501612607565b91505092915050565b6000602082840312156129205761291f613649565b5b600061292e84828501612635565b91505092915050565b6000806000806060858703121561295157612950613649565b5b600061295f87828801612635565b945050602061297087828801612635565b935050604085013567ffffffffffffffff81111561299157612990613644565b5b61299d8782880161252f565b925092505092959194509250565b6129b48161337a565b82525050565b6129cb6129c68261337a565b6134e6565b82525050565b6129da8161338c565b82525050565b6129e981613398565b82525050565b60006129fa8261327c565b612a048185613292565b9350612a14818560208601613407565b612a1d8161364e565b840191505092915050565b6000612a3382613287565b612a3d81856132a3565b9350612a4d818560208601613407565b612a568161364e565b840191505092915050565b6000612a6c82613287565b612a7681856132b4565b9350612a86818560208601613407565b80840191505092915050565b60008154612a9f8161343a565b612aa981866132b4565b94506001821660008114612ac45760018114612ad557612b08565b60ff19831686528186019350612b08565b612ade85613267565b60005b83811015612b0057815481890152600182019150602081019050612ae1565b838801955050505b50505092915050565b6000612b1e6025836132a3565b9150612b298261366c565b604082019050919050565b6000612b416032836132a3565b9150612b4c826136bb565b604082019050919050565b6000612b646026836132a3565b9150612b6f8261370a565b604082019050919050565b6000612b876025836132a3565b9150612b9282613759565b604082019050919050565b6000612baa601c836132a3565b9150612bb5826137a8565b602082019050919050565b6000612bcd6024836132a3565b9150612bd8826137d1565b604082019050919050565b6000612bf06019836132a3565b9150612bfb82613820565b602082019050919050565b6000612c13601c836132a3565b9150612c1e82613849565b602082019050919050565b6000612c36602c836132a3565b9150612c4182613872565b604082019050919050565b6000612c596038836132a3565b9150612c64826138c1565b604082019050919050565b6000612c7c6011836132a3565b9150612c8782613910565b602082019050919050565b6000612c9f602a836132a3565b9150612caa82613939565b604082019050919050565b6000612cc26029836132a3565b9150612ccd82613988565b604082019050919050565b6000612ce56020836132a3565b9150612cf0826139d7565b602082019050919050565b6000612d08602c836132a3565b9150612d1382613a00565b604082019050919050565b6000612d2b6020836132a3565b9150612d3682613a4f565b602082019050919050565b6000612d4e6021836132a3565b9150612d5982613a78565b604082019050919050565b6000612d716031836132a3565b9150612d7c82613ac7565b604082019050919050565b6000612d946015836132a3565b9150612d9f82613b16565b602082019050919050565b6000612db76030836132a3565b9150612dc282613b3f565b604082019050919050565b6000612dda6015836132a3565b9150612de582613b8e565b602082019050919050565b612df9816133ee565b82525050565b612e10612e0b826133ee565b61350a565b82525050565b6000612e2282856129ba565b601482019150612e328284612dff565b6020820191508190509392505050565b6000612e4e8285612a92565b9150612e5a8284612a61565b91508190509392505050565b6000602082019050612e7b60008301846129ab565b92915050565b6000608082019050612e9660008301876129ab565b612ea360208301866129ab565b612eb06040830185612df0565b8181036060830152612ec281846129ef565b905095945050505050565b6000602082019050612ee260008301846129d1565b92915050565b6000602082019050612efd60008301846129e0565b92915050565b60006020820190508181036000830152612f1d8184612a28565b905092915050565b60006020820190508181036000830152612f3e81612b11565b9050919050565b60006020820190508181036000830152612f5e81612b34565b9050919050565b60006020820190508181036000830152612f7e81612b57565b9050919050565b60006020820190508181036000830152612f9e81612b7a565b9050919050565b60006020820190508181036000830152612fbe81612b9d565b9050919050565b60006020820190508181036000830152612fde81612bc0565b9050919050565b60006020820190508181036000830152612ffe81612be3565b9050919050565b6000602082019050818103600083015261301e81612c06565b9050919050565b6000602082019050818103600083015261303e81612c29565b9050919050565b6000602082019050818103600083015261305e81612c4c565b9050919050565b6000602082019050818103600083015261307e81612c6f565b9050919050565b6000602082019050818103600083015261309e81612c92565b9050919050565b600060208201905081810360008301526130be81612cb5565b9050919050565b600060208201905081810360008301526130de81612cd8565b9050919050565b600060208201905081810360008301526130fe81612cfb565b9050919050565b6000602082019050818103600083015261311e81612d1e565b9050919050565b6000602082019050818103600083015261313e81612d41565b9050919050565b6000602082019050818103600083015261315e81612d64565b9050919050565b6000602082019050818103600083015261317e81612d87565b9050919050565b6000602082019050818103600083015261319e81612daa565b9050919050565b600060208201905081810360008301526131be81612dcd565b9050919050565b60006020820190506131da6000830184612df0565b92915050565b60006131ea6131fb565b90506131f6828261346c565b919050565b6000604051905090565b600067ffffffffffffffff8211156132205761321f613601565b5b6132298261364e565b9050602081019050919050565b600067ffffffffffffffff82111561325157613250613601565b5b61325a8261364e565b9050602081019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006132ca826133ee565b91506132d5836133ee565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561330a57613309613545565b5b828201905092915050565b6000613320826133ee565b915061332b836133ee565b92508261333b5761333a613574565b5b828204905092915050565b6000613351826133ee565b915061335c836133ee565b92508282101561336f5761336e613545565b5b828203905092915050565b6000613385826133ce565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561342557808201518184015260208101905061340a565b83811115613434576000848401525b50505050565b6000600282049050600182168061345257607f821691505b60208210811415613466576134656135a3565b5b50919050565b6134758261364e565b810181811067ffffffffffffffff8211171561349457613493613601565b5b80604052505050565b60006134a8826133ee565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156134db576134da613545565b5b600182019050919050565b60006134f1826134f8565b9050919050565b60006135038261365f565b9050919050565b6000819050919050565b600061351f826133ee565b915061352a836133ee565b92508261353a57613539613574565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f4e6f7420656e6f75676820706f7274616c732072656d61696e696e6720746f2060008201527f636c61696d000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f50726f6f6620646f6573206e6f7420657869737420696e207472656500000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4e6f6e6578697374656e7420746f6b656e000000000000000000000000000000600082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f45786365656473206d617820636c61696d61626c650000000000000000000000600082015250565b7f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656400000000000000000000000000000000602082015250565b7f436c61696d206c697374206e6f74206163746976650000000000000000000000600082015250565b613bc08161337a565b8114613bcb57600080fd5b50565b613bd78161338c565b8114613be257600080fd5b50565b613bee81613398565b8114613bf957600080fd5b50565b613c05816133a2565b8114613c1057600080fd5b50565b613c1c816133ee565b8114613c2757600080fd5b5056fea2646970667358221220e5fad718ffd38d3cb78a6a65fe94aed242d5b0b458868daea5ab268f3e3c5bac64736f6c63430008070033
Verified Source Code Partial Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: No
CatBloxMetaPortals.sol 1378 lines
// File: @openzeppelin/contracts/utils/cryptography/MerkleProof.sol
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = _efficientHash(computedHash, proofElement);
} else {
// Hash(current element of the proof + current computed hash)
computedHash = _efficientHash(proofElement, computedHash);
}
}
return computedHash;
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
// File: @openzeppelin/contracts/utils/Counters.sol
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
// File: @openzeppelin/contracts/utils/Strings.sol
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
// File: @openzeppelin/contracts/utils/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 (last updated v4.5.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
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/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 (last updated v4.5.0) (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);
_afterTokenTransfer(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);
_afterTokenTransfer(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 from incorrect owner");
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);
_afterTokenTransfer(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 {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
// File: @openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 Burnable Token
* @dev ERC721 Token that can be irreversibly burned (destroyed).
*/
abstract contract ERC721Burnable is Context, ERC721 {
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*
* Requirements:
*
* - The caller must own `tokenId` or be an approved operator.
*/
function burn(uint256 tokenId) public virtual {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
_burn(tokenId);
}
}
// File: CatBloxMetaPortals.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
contract CatBloxMetaPortals is ERC721, ERC721Burnable, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private tokenCounter;
string public baseURI;
string public provenanceHash;
bool public isClaimingActive;
bytes32 public claimListMerkleRoot;
uint256 public immutable maxPortals;
mapping(address => uint256) public claimListMintCounts;
// ============ ACCESS CONTROL/SANITY MODIFIERS ============
modifier claimListActive() {
require(isClaimingActive, "Claim list not active");
_;
}
modifier totalNotExceeded(uint256 numberOfTokens) {
require(
tokenCounter.current() + numberOfTokens <= maxPortals,
"Not enough portals remaining to claim"
);
_;
}
modifier isValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root, uint256 maxClaimable) {
require(
MerkleProof.verify(
merkleProof,
root,
keccak256(abi.encodePacked(msg.sender, maxClaimable))
),
"Proof does not exist in tree"
);
_;
}
constructor(string memory _baseURI, uint256 _maxPortals) ERC721("CatBloxMetaPortals", "CBLXMP") {
baseURI = _baseURI;
maxPortals = _maxPortals;
}
// ============ PUBLIC FUNCTION FOR CLAIMING ============
function claim(
uint256 numberOfTokens,
uint256 maxClaimable,
bytes32[] calldata merkleProof
)
external
claimListActive
totalNotExceeded(numberOfTokens)
isValidMerkleProof(merkleProof, claimListMerkleRoot, maxClaimable)
{
uint256 numAlreadyMinted = claimListMintCounts[msg.sender];
require(numAlreadyMinted + numberOfTokens <= maxClaimable, "Exceeds max claimable");
claimListMintCounts[msg.sender] = numAlreadyMinted + numberOfTokens;
for (uint256 i = 0; i < numberOfTokens; i++) {
_safeMint(msg.sender, nextTokenId());
}
}
// ============ PUBLIC READ-ONLY FUNCTIONS ============
function totalSupply() external view returns (uint256) {
return tokenCounter.current();
}
// ============ OWNER-ONLY ADMIN FUNCTIONS ============
function setBaseURI(string memory _baseURI) external onlyOwner {
baseURI = _baseURI;
}
function setProvenanceHash(string memory _hash) external onlyOwner {
provenanceHash = _hash;
}
// Toggle Claiming Active / Inactive
function setClaimingActive(bool _isClaimingActive) external onlyOwner {
isClaimingActive = _isClaimingActive;
}
// Set Merkle Roots
function setClaimListMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
claimListMerkleRoot = _merkleRoot;
}
// ============ SUPPORTING FUNCTIONS ============
function nextTokenId() private returns (uint256) {
tokenCounter.increment();
return tokenCounter.current();
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
require(_exists(tokenId), "Nonexistent token");
return string(abi.encodePacked(baseURI, tokenId.toString()));
}
}
Read Contract
balanceOf 0x70a08231 → uint256
baseURI 0x6c0360eb → string
claimListMerkleRoot 0x326f9ad3 → bytes32
claimListMintCounts 0xc503b18a → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isClaimingActive 0x3732ad1c → bool
maxPortals 0xa8691a3a → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
provenanceHash 0xc6ab67a3 → string
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
Write Contract 13 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
burn 0x42966c68
uint256 tokenId
claim 0xae0b51df
uint256 numberOfTokens
uint256 maxClaimable
bytes32[] merkleProof
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x55f804b3
string _baseURI
setClaimListMerkleRoot 0x15bdebe2
bytes32 _merkleRoot
setClaimingActive 0x30ea4199
bool _isClaimingActive
setProvenanceHash 0x10969523
string _hash
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address