Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xA7a05e655cbeD5356d2fA851e96f7f68E4A6f954
Balance 0 ETH
Nonce 1
Code Size 23718 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

23718 bytes
0x608060405234801561001057600080fd5b50600436106103405760003560e01c80637e518ec8116101bd578063adebf6f2116100f9578063d0011d9d116100a2578063f242432a1161007c578063f242432a146111ab578063f247296514611276578063f2fde38b14611329578063f3993d111461134f57610340565b8063d0011d9d14611134578063d547741f14611151578063e985e9c51461117d57610340565b8063c7778baa116100d3578063c7778baa146110dd578063c87b56dd146110fa578063ca15c8731461111757610340565b8063adebf6f214610fdd578063b88d4fde14610ffa578063bd85b039146110c057610340565b806391d148541161016657806398650275116101405780639865027514610f79578063a217fddf14610f81578063a22cb46514610f89578063aa271e1a14610fb757610340565b806391d1485414610f1f57806395d89b4114610f4b578063983b2d5614610f5357610340565b80638832e6e3116101975780638832e6e314610e395780638da5cb5b14610ef45780639010d07c14610efc57610340565b80637e518ec814610c8a5780638053493414610cfa5780638456cb5914610e3157610340565b806336568abe1161028c578063510b5158116102355780635cfa92971161020f5780635cfa929714610b7d5780636352211e14610c3f57806370a0823114610c5c578063715018a614610c8257610340565b8063510b515814610b505780635b2bd79e14610b6d5780635c975abb14610b7557610340565b806342842e0e1161026657806342842e0e146109555780634684d7e91461098b5780634e1273f414610a3e57610340565b806336568abe146108f55780633f4ba83a1461092157806340c10f191461092957610340565b80630e89341c116102ee578063248a9ca3116102c8578063248a9ca3146106e55780632eb2c2d6146107025780632f2ff15d146108c957610340565b80630e89341c14610660578063124d91e51461067d57806323b872dd146106af57610340565b8063081812fc1161031f578063081812fc1461043b578063095ea7b3146104745780630d6a5bbb146104a257610340565b8062fdd58e1461034557806301ffc9a71461038357806306fdde03146103be575b600080fd5b6103716004803603604081101561035b57600080fd5b506001600160a01b03813516906020013561140b565b60408051918252519081900360200190f35b6103aa6004803603602081101561039957600080fd5b50356001600160e01b0319166114d6565b604080519115158252519081900360200190f35b6103c6611551565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104005781810151838201526020016103e8565b50505050905090810190601f16801561042d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104586004803603602081101561045157600080fd5b503561158a565b604080516001600160a01b039092168252519081900360200190f35b6104a06004803603604081101561048a57600080fd5b506001600160a01b038135169060200135611629565b005b6104a0600480360360808110156104b857600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156104e357600080fd5b8201836020820111156104f557600080fd5b8035906020019184602083028401116401000000008311171561051757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561056757600080fd5b82018360208201111561057957600080fd5b8035906020019184602083028401116401000000008311171561059b57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092959493602081019350359150506401000000008111156105eb57600080fd5b8201836020820111156105fd57600080fd5b8035906020019184600183028401116401000000008311171561061f57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061177b945050505050565b6103c66004803603602081101561067657600080fd5b50356117ee565b6104a06004803603606081101561069357600080fd5b506001600160a01b0381351690602081013590604001356117f9565b6104a0600480360360608110156106c557600080fd5b506001600160a01b03813581169160208101359091169060400135611857565b610371600480360360208110156106fb57600080fd5b50356118b0565b6104a0600480360360a081101561071857600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561074c57600080fd5b82018360208201111561075e57600080fd5b8035906020019184602083028401116401000000008311171561078057600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092959493602081019350359150506401000000008111156107d057600080fd5b8201836020820111156107e257600080fd5b8035906020019184602083028401116401000000008311171561080457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561085457600080fd5b82018360208201111561086657600080fd5b8035906020019184600183028401116401000000008311171561088857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506118c5945050505050565b6104a0600480360360408110156108df57600080fd5b50803590602001356001600160a01b0316611927565b6104a06004803603604081101561090b57600080fd5b50803590602001356001600160a01b0316611993565b6104a06119f4565b6104a06004803603604081101561093f57600080fd5b506001600160a01b038135169060200135611a72565b6104a06004803603606081101561096b57600080fd5b506001600160a01b03813581169160208101359091169060400135611aea565b6104a0600480360360408110156109a157600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156109cc57600080fd5b8201836020820111156109de57600080fd5b80359060200191846020830284011164010000000083111715610a0057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611b43945050505050565b610b0060048036036040811015610a5457600080fd5b810190602081018135640100000000811115610a6f57600080fd5b820183602082011115610a8157600080fd5b80359060200191846020830284011164010000000083111715610aa357600080fd5b919390929091602081019035640100000000811115610ac157600080fd5b820183602082011115610ad357600080fd5b80359060200191846020830284011164010000000083111715610af557600080fd5b509092509050611ba9565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610b3c578181015183820152602001610b24565b505050509050019250505060405180910390f35b61045860048036036020811015610b6657600080fd5b5035611caf565b6103c6611cba565b6103aa611d48565b6104a060048036036080811015610b9357600080fd5b6001600160a01b038235169160208101359160408201359190810190608081016060820135640100000000811115610bca57600080fd5b820183602082011115610bdc57600080fd5b80359060200191846001830284011164010000000083111715610bfe57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611d59945050505050565b61045860048036036020811015610c5557600080fd5b5035611dc1565b61037160048036036020811015610c7257600080fd5b50356001600160a01b0316611dcc565b6104a0611e45565b6104a060048036036020811015610ca057600080fd5b810190602081018135640100000000811115610cbb57600080fd5b820183602082011115610ccd57600080fd5b80359060200191846001830284011164010000000083111715610cef57600080fd5b509092509050611f06565b6104a060048036036060811015610d1057600080fd5b6001600160a01b038235169190810190604081016020820135640100000000811115610d3b57600080fd5b820183602082011115610d4d57600080fd5b80359060200191846020830284011164010000000083111715610d6f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050640100000000811115610dbf57600080fd5b820183602082011115610dd157600080fd5b80359060200191846020830284011164010000000083111715610df357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611fe1945050505050565b6104a061203a565b6104a060048036036060811015610e4f57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135640100000000811115610e7f57600080fd5b820183602082011115610e9157600080fd5b80359060200191846001830284011164010000000083111715610eb357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506120b6945050505050565b61045861211f565b61045860048036036040811015610f1257600080fd5b508035906020013561212e565b6103aa60048036036040811015610f3557600080fd5b50803590602001356001600160a01b0316612153565b6103c6612171565b6104a060048036036020811015610f6957600080fd5b50356001600160a01b03166121aa565b6104a06122a3565b610371612350565b6104a060048036036040811015610f9f57600080fd5b506001600160a01b0381351690602001351515612355565b6103aa60048036036020811015610fcd57600080fd5b50356001600160a01b031661235f565b6103aa60048036036020811015610ff357600080fd5b503561236b565b6104a06004803603608081101561101057600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561104b57600080fd5b82018360208201111561105d57600080fd5b8035906020019184600183028401116401000000008311171561107f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612376945050505050565b610371600480360360208110156110d657600080fd5b50356123d0565b610371600480360360208110156110f357600080fd5b5035612426565b6103c66004803603602081101561111057600080fd5b503561248b565b6103716004803603602081101561112d57600080fd5b5035612500565b6104a06004803603602081101561114a57600080fd5b5035612517565b6104a06004803603604081101561116757600080fd5b50803590602001356001600160a01b031661258d565b6103aa6004803603604081101561119357600080fd5b506001600160a01b03813581169160200135166125e6565b6104a0600480360360a08110156111c157600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a08101608082013564010000000081111561120157600080fd5b82018360208201111561121357600080fd5b8035906020019184600183028401116401000000008311171561123557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506125f2945050505050565b6104a06004803603604081101561128c57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156112b757600080fd5b8201836020820111156112c957600080fd5b803590602001918460208302840111640100000000831117156112eb57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061264d945050505050565b6104a06004803603602081101561133f57600080fd5b50356001600160a01b03166126a5565b6104a06004803603606081101561136557600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561139957600080fd5b8201836020820111156113ab57600080fd5b803590602001918460208302840111640100000000831117156113cd57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506127bc945050505050565b60006001600160a01b038316611468576040805162461bcd60e51b815260206004820152601760248201527f496e76656e746f72793a207a65726f2061646472657373000000000000000000604482015290519081900360640190fd5b6114718261282a565b156114ab576000828152600460205260409020546001600160a01b0384811691161461149e5760006114a1565b60015b60ff1690506114d0565b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b60006114e18261287c565b8061151557506001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000145b8061154957506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b90505b919050565b6040518060400160405280600e81526020017f5245565620496e76656e746f727900000000000000000000000000000000000081525081565b6000818152600460205260408120546001600160a01b0381166115f4576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a206e6f6e2d6578697374696e67204e46540000000000604482015290519081900360640190fd5b600160a01b81161561161f5750506000818152600760205260409020546001600160a01b031661154c565b600091505061154c565b600061163482611dc1565b9050806001600160a01b0316836001600160a01b0316141561169d576040805162461bcd60e51b815260206004820152601860248201527f496e76656e746f72793a2073656c662d617070726f76616c0000000000000000604482015290519081900360640190fd5b6116ae816116a9612949565b61294d565b6116ff576040805162461bcd60e51b815260206004820152601e60248201527f496e76656e746f72793a206e6f6e2d617070726f7665642073656e6465720000604482015290519081900360640190fd5b60008281526004602090815260408083206001600160a01b03808616600160a01b81179092556007909352818420805493881673ffffffffffffffffffffffffffffffffffffffff1990941684179055905185937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b61178b611786612949565b61235f565b6117dc576040805162461bcd60e51b815260206004820152601760248201527f496e76656e746f72793a206e6f742061206d696e746572000000000000000000604482015290519081900360640190fd5b6117e884848484612999565b50505050565b606061154982612d55565b611801611d48565b15611847576040805162461bcd60e51b8152602060048201526011602482015270125b9d995b9d1bdc9e4e881c185d5cd959607a1b604482015290519081900360640190fd5b611852838383612e28565b505050565b61185f611d48565b156118a5576040805162461bcd60e51b8152602060048201526011602482015270125b9d995b9d1bdc9e4e881c185d5cd959607a1b604482015290519081900360640190fd5b611852838383612f1b565b60009081526009602052604090206002015490565b6118cd611d48565b15611913576040805162461bcd60e51b8152602060048201526011602482015270125b9d995b9d1bdc9e4e881c185d5cd959607a1b604482015290519081900360640190fd5b6119208585858585612f38565b5050505050565b60008281526009602052604090206002015461194a90611945612949565b612153565b6119855760405162461bcd60e51b815260040180806020018281038252602f815260200180615bbd602f913960400191505060405180910390fd5b61198f8282612f45565b5050565b61199b612949565b6001600160a01b0316816001600160a01b0316146119ea5760405162461bcd60e51b815260040180806020018281038252602f815260200180615c42602f913960400191505060405180910390fd5b61198f8282612fb4565b6119fc612949565b6001600160a01b0316611a0d61211f565b6001600160a01b031614611a68576040805162461bcd60e51b815260206004820152601860248201527f496e76656e746f72793a206e6f7420746865206f776e65720000000000000000604482015290519081900360640190fd5b611a70613023565b565b611a7d611786612949565b611ace576040805162461bcd60e51b815260206004820152601760248201527f496e76656e746f72793a206e6f742061206d696e746572000000000000000000604482015290519081900360640190fd5b61198f82826040518060200160405280600081525060006130ef565b611af2611d48565b15611b38576040805162461bcd60e51b8152602060048201526011602482015270125b9d995b9d1bdc9e4e881c185d5cd959607a1b604482015290519081900360640190fd5b611852838383613293565b611b4e611786612949565b611b9f576040805162461bcd60e51b815260206004820152601760248201527f496e76656e746f72793a206e6f742061206d696e746572000000000000000000604482015290519081900360640190fd5b61198f82826132b0565b6060838214611bff576040805162461bcd60e51b815260206004820152601e60248201527f496e76656e746f72793a20696e636f6e73697374656e74206172726179730000604482015290519081900360640190fd5b60608467ffffffffffffffff81118015611c1857600080fd5b50604051908082528060200260200182016040528015611c42578160200160208202803683370190505b50905060005b808614611ca557611c86878783818110611c5e57fe5b905060200201356001600160a01b0316868684818110611c7a57fe5b9050602002013561140b565b828281518110611c9257fe5b6020908102919091010152600101611c48565b5095945050505050565b60006115498261360f565b6008805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015611d405780601f10611d1557610100808354040283529160200191611d40565b820191906000526020600020905b815481529060010190602001808311611d2357829003601f168201915b505050505081565b600054600160a01b900460ff165b90565b611d64611786612949565b611db5576040805162461bcd60e51b815260206004820152601760248201527f496e76656e746f72793a206e6f742061206d696e746572000000000000000000604482015290519081900360640190fd5b6117e884848484613688565b6000611549826137d3565b60006001600160a01b038216611e29576040805162461bcd60e51b815260206004820152601760248201527f496e76656e746f72793a207a65726f2061646472657373000000000000000000604482015290519081900360640190fd5b506001600160a01b031660009081526006602052604090205490565b611e4d612949565b6000546001600160a01b03908116911614611eaf576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b611f0e612949565b6000546001600160a01b03908116911614611f70576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b611f7c60088383615b02565b507f04b1dc5c136a3ce9fded8db0ce3d3366c58764ec3a8e4c2b9e52e4ddfe5ebbf7828260405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a15050565b611fe9611d48565b1561202f576040805162461bcd60e51b8152602060048201526011602482015270125b9d995b9d1bdc9e4e881c185d5cd959607a1b604482015290519081900360640190fd5b61185283838361383d565b612042612949565b6001600160a01b031661205361211f565b6001600160a01b0316146120ae576040805162461bcd60e51b815260206004820152601860248201527f496e76656e746f72793a206e6f7420746865206f776e65720000000000000000604482015290519081900360640190fd5b611a70613ada565b6120c1611786612949565b612112576040805162461bcd60e51b815260206004820152601760248201527f496e76656e746f72793a206e6f742061206d696e746572000000000000000000604482015290519081900360640190fd5b61185283838360016130ef565b6000546001600160a01b031690565b600082815260096020526040812061214c908363ffffffff613b9016565b9392505050565b600082815260096020526040812061214c908363ffffffff613b9c16565b6040518060400160405280600681526020017f524556562d49000000000000000000000000000000000000000000000000000081525081565b6121b5611786612949565b612206576040805162461bcd60e51b815260206004820152601860248201527f4d696e746572526f6c653a206e6f742061204d696e7465720000000000000000604482015290519081900360640190fd5b61220f8161235f565b15612261576040805162461bcd60e51b815260206004820152601a60248201527f4d696e746572526f6c653a20616c7265616479204d696e746572000000000000604482015290519081900360640190fd5b61226c600082611927565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b6122ae611786612949565b6122ff576040805162461bcd60e51b815260206004820152601860248201527f4d696e746572526f6c653a206e6f742061204d696e7465720000000000000000604482015290519081900360640190fd5b612311600061230c612949565b611993565b612319612949565b6001600160a01b03167fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669260405160405180910390a2565b600081565b61198f8282613bb1565b60006115498183612153565b600061154982613c92565b61237e611d48565b156123c4576040805162461bcd60e51b8152602060048201526011602482015270125b9d995b9d1bdc9e4e881c185d5cd959607a1b604482015290519081900360640190fd5b6117e884848484613cb8565b60006123db8261282a565b15612411576000828152600460205260409020546001600160a01b031615612404576001612407565b60005b60ff16905061154c565b5060008181526003602052604090205461154c565b60006124318261282a565b612482576040805162461bcd60e51b815260206004820152601560248201527f496e76656e746f72793a206e6f7420616e204e46540000000000000000000000604482015290519081900360640190fd5b61154982613cc6565b6000818152600460205260409020546060906001600160a01b03166124f7576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a206e6f6e2d6578697374696e67204e46540000000000604482015290519081900360640190fd5b611549826117ee565b600081815260096020526040812061154990613cd3565b61251f612949565b6000546001600160a01b03908116911614612581576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61258a81613cde565b50565b6000828152600960205260409020600201546125ab90611945612949565b6119ea5760405162461bcd60e51b8152600401808060200182810382526030815260200180615c126030913960400191505060405180910390fd5b600061214c8383613e1f565b6125fa611d48565b15612640576040805162461bcd60e51b8152602060048201526011602482015270125b9d995b9d1bdc9e4e881c185d5cd959607a1b604482015290519081900360640190fd5b6119208585858585613e4d565b612655611d48565b1561269b576040805162461bcd60e51b8152602060048201526011602482015270125b9d995b9d1bdc9e4e881c185d5cd959607a1b604482015290519081900360640190fd5b61198f8282613fcb565b6126ad612949565b6000546001600160a01b0390811691161461270f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166127545760405162461bcd60e51b8152600401808060200182810382526026815260200180615bec6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6127c4611d48565b1561280a576040805162461bcd60e51b8152602060048201526011602482015270125b9d995b9d1bdc9e4e881c185d5cd959607a1b604482015290519081900360640190fd5b611852838383614229565b600061214c836001600160a01b038416614511565b60007f80000000000000000000000000000000000000000000000000000000000000008216158015906115495750507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16151590565b60006001600160e01b031982167f01ffc9a70000000000000000000000000000000000000000000000000000000014806128df57506001600160e01b031982167fd9b67a2600000000000000000000000000000000000000000000000000000000145b8061291357506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b806115495750506001600160e01b0319167fb44bec7f000000000000000000000000000000000000000000000000000000001490565b3390565b6000816001600160a01b0316836001600160a01b0316148061214c5750506001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6001600160a01b0384166129f4576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a207472616e7366657220746f207a65726f0000000000604482015290519081900360640190fd5b825182518114612a4b576040805162461bcd60e51b815260206004820152601e60248201527f496e76656e746f72793a20696e636f6e73697374656e74206172726179730000604482015290519081900360640190fd5b6000806000805b848114612bf9576000888281518110612a6757fe5b602002602001015190506000888381518110612a7f57fe5b60200260200101519050612a9282613c92565b15612aa757612aa28b838361455b565b612bef565b612ab08261282a565b15612ba257612ac28b8383600161464d565b60405182906001600160a01b038d16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46000612b0583613cc6565b905086612b185780965060019550612b9c565b868114612b9557856002600089815260200190815260200160002060008e6001600160a01b03166001600160a01b0316815260200190815260200160002060008282540192505081905550856003600089815260200190815260200160002060008282540192505081905550809650858501945060019550612b9c565b8560010195505b50612bef565b6040805162461bcd60e51b815260206004820152601960248201527f496e76656e746f72793a206e6f74206120746f6b656e20696400000000000000604482015290519081900360640190fd5b5050600101612a52565b508215612c4e5760008381526002602090815260408083206001600160a01b038c1680855290835281842080548701905586845260038352818420805487019055835260069091529020805491830191820190555b6001600160a01b0388166000612c62612949565b6001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8a8a604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015612cd2578181015183820152602001612cba565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015612d11578181015183820152602001612cf9565b5050505090500194505050505060405180910390a4612d38886001600160a01b031661477c565b15612d4b57612d4b600089898989614782565b5050505050505050565b60606008612d628361499a565b6040516020018083805460018160011615610100020316600290048015612dc05780601f10612d9e576101008083540402835291820191612dc0565b820191906000526020600020905b815481529060010190602001808311612dac575b5050825160208401908083835b60208310612dec5780518252601f199092019160209182019101612dcd565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529050919050565b6000612e32612949565b90506000612e40858361294d565b9050612e4b84613c92565b15612e6157612e5c85858584614aa9565b612eb6565b612e6a8461282a565b15612ba257612e7d858585846000614c05565b60405184906000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45b60006001600160a01b0316856001600160a01b0316836001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628787604051808381526020018281526020019250505060405180910390a45050505050565b611852838383604051806020016040528060008152506000614dcc565b6119208585858585614f3a565b6000828152600960205260409020612f63908263ffffffff61281516565b1561198f57612f70612949565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152600960205260409020612fd2908263ffffffff61525416565b1561198f57612fdf612949565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600054600160a01b900460ff16613081576040805162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6130d2612949565b604080516001600160a01b039092168252519081900360200190a1565b6001600160a01b03841661314a576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a207472616e7366657220746f207a65726f0000000000604482015290519081900360640190fd5b6131538361282a565b6131a4576040805162461bcd60e51b815260206004820152601560248201527f496e76656e746f72793a206e6f7420616e204e46540000000000000000000000604482015290519081900360640190fd5b6131b284846001600061464d565b60405183906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46001600160a01b03841660006131fe612949565b6001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62866001604051808381526020018281526020019250505060405180910390a4613259846001600160a01b031661477c565b156117e85761326784615269565b156132805761327b60008585600186615331565b6117e8565b80156117e8576117e86000858585615445565b611852838383604051806020016040528060008152506001614dcc565b6001600160a01b03821661330b576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a207472616e7366657220746f207a65726f0000000000604482015290519081900360640190fd5b805160608167ffffffffffffffff8111801561332657600080fd5b50604051908082528060200260200182016040528015613350578160200160208202803683370190505b50905060008060005b8481146134ab57600086828151811061336e57fe5b602002602001015190506133818161282a565b6133d2576040805162461bcd60e51b815260206004820152601560248201527f496e76656e746f72793a206e6f7420616e204e46540000000000000000000000604482015290519081900360640190fd5b60018583815181106133e057fe5b6020026020010181815250506133f9888260018061464d565b60405181906001600160a01b038a16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4600061343c82613cc6565b90508461344f57809450600193506134a1565b84811461349a5760008581526002602090815260408083206001600160a01b038d168452825280832080548801905596825260039052949094208054909301909255600191836134a1565b8360010193505b5050600101613359565b5060008281526002602090815260408083206001600160a01b038a168085529083528184208054860190558584526003835281842080548601905580845260069092528220805487019055906134ff612949565b6001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8887604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561356f578181015183820152602001613557565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156135ae578181015183820152602001613596565b5050505090500194505050505060405180910390a46135d5866001600160a01b031661477c565b80156135e557506135e586615269565b1561360757613607600087878660405180602001604052806000815250614782565b505050505050565b600061361a8261282a565b1561366c576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a206e6f74206120636f6c6c656374696f6e0000000000604482015290519081900360640190fd5b506000908152600560205260409020546001600160a01b031690565b6001600160a01b0384166136e3576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a207472616e7366657220746f207a65726f0000000000604482015290519081900360640190fd5b60006136ed612949565b90506136f884613c92565b1561370d5761370885858561455b565b613761565b6137168461282a565b15612ba257613728858585600061464d565b60405184906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45b604080518581526020810185905281516001600160a01b0380891693600093918616927fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f629281900390910190a46137c0856001600160a01b031661477c565b1561192057611920600086868686615331565b6000818152600460205260408120546001600160a01b038116611549576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a206e6f6e2d6578697374696e67204e46540000000000604482015290519081900360640190fd5b815181518114613894576040805162461bcd60e51b815260206004820152601e60248201527f496e76656e746f72793a20696e636f6e73697374656e74206172726179730000604482015290519081900360640190fd5b600061389e612949565b905060006138ac868361294d565b90506000806000805b8681146139bf5760008982815181106138ca57fe5b602002602001015190506138dd81613c92565b15613906576139018b828b85815181106138f357fe5b602002602001015189614aa9565b6139b6565b61390f8161282a565b15612ba2576139358b828b858151811061392557fe5b6020026020010151896001614c05565b60405181906000906001600160a01b038e16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4600061397882613cc6565b90508561398b57809550600194506139b4565b8581146139ad5761399d8c87876155d9565b94506001939290920191846139b4565b8460010194505b505b506001016138b5565b5082156139f5576139d18984846155d9565b6001600160a01b038916600090815260066020526040902080549183019182900390555b60006001600160a01b0316896001600160a01b0316866001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8b8b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015613a7b578181015183820152602001613a63565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015613aba578181015183820152602001613aa2565b5050505090500194505050505060405180910390a4505050505050505050565b600054600160a01b900460ff1615613b39576040805162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586130d2612949565b600061214c8383615619565b600061214c836001600160a01b03841661567d565b6000613bbb612949565b9050806001600160a01b0316836001600160a01b03161415613c24576040805162461bcd60e51b815260206004820152601860248201527f496e76656e746f72793a2073656c662d617070726f76616c0000000000000000604482015290519081900360640190fd5b6001600160a01b03818116600081815260016020908152604080832094881680845294825291829020805460ff1916871515908117909155825190815291517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319281900390910190a3505050565b7f8000000000000000000000000000000000000000000000000000000000000000161590565b6117e8848484846001614dcc565b6001600160e01b03191690565b600061154982615695565b613ce78161282a565b15613d39576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a206e6f74206120636f6c6c656374696f6e0000000000604482015290519081900360640190fd5b6000818152600560205260409020546001600160a01b031615613da3576040805162461bcd60e51b815260206004820152601e60248201527f496e76656e746f72793a206578697374696e6720636f6c6c656374696f6e0000604482015290519081900360640190fd5b613dab612949565b6000828152600560205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055613ded81613c92565b1515817f4ebf8ad0df535ba5e487bc9cb27fe44120ca81c3a95d3eba79c0bd1df2ab2d5d60405160405180910390a350565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6000613e57612949565b90506001600160a01b038516613eb4576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a207472616e7366657220746f207a65726f0000000000604482015290519081900360640190fd5b6000613ec0878361294d565b9050613ecb85613c92565b15613ee257613edd8787878785615699565b613f41565b613eeb8561282a565b15612ba257613eff8787878785600061580c565b84866001600160a01b0316886001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b856001600160a01b0316876001600160a01b0316836001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628888604051808381526020018281526020019250505060405180910390a4613fb0866001600160a01b031661477c565b15613fc257613fc28787878787615331565b50505050505050565b6000613fd5612949565b90506000613fe3848361294d565b835190915060608167ffffffffffffffff8111801561400157600080fd5b5060405190808252806020026020018201604052801561402b578160200160208202803683370190505b50905060008060005b84811461411357600088828151811061404957fe5b60200260200101519050600185838151811061406157fe5b60200260200101818152505061408e8a8287858151811061407e57fe5b60200260200101518a6001614c05565b60405181906000906001600160a01b038d16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a460006140d182613cc6565b9050846140e45780945060019350614109565b848114614102576140f68b86866155d9565b80945060019350614109565b8360010193505b5050600101614034565b508115614145576141258883836155d9565b6001600160a01b0388166000908152600660205260409020805485900390555b60006001600160a01b0316886001600160a01b0316876001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8a87604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156141cb5781810151838201526020016141b3565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561420a5781810151838201526020016141f2565b5050505090500194505050505060405180910390a45050505050505050565b6001600160a01b038216614284576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a207472616e7366657220746f207a65726f0000000000604482015290519081900360640190fd5b600061428e612949565b9050600061429c858361294d565b835190915060608167ffffffffffffffff811180156142ba57600080fd5b506040519080825280602002602001820160405280156142e4578160200160208202803683370190505b50905060008060005b8481146143c557600088828151811061430257fe5b60200260200101519050600185838151811061431a57fe5b6020026020010181815250506143368b8b8360018b600161580c565b808a6001600160a01b03168c6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4600061438282613cc6565b90508461439557809450600193506143bb565b8481146143b4576143a88c8c878761599d565b809450600193506143bb565b8360010193505b50506001016142ed565b5081156143e3576143d88989848461599d565b6143e38989866159f1565b876001600160a01b0316896001600160a01b03166143ff612949565b6001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8a87604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561446f578181015183820152602001614457565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156144ae578181015183820152602001614496565b5050505090500194505050505060405180910390a46144d5886001600160a01b031661477c565b80156144e557506144e588615269565b15614506576145068989898660405180602001604052806000815250614782565b505050505050505050565b600061451d838361567d565b614553575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556114d0565b5060006114d0565b806145ad576040805162461bcd60e51b815260206004820152601560248201527f496e76656e746f72793a207a65726f2076616c75650000000000000000000000604482015290519081900360640190fd5b600082815260036020526040902054818101818111614613576040805162461bcd60e51b815260206004820152601a60248201527f496e76656e746f72793a20737570706c79206f766572666c6f77000000000000604482015290519081900360640190fd5b600093845260036020908152604080862092909255600281528185206001600160a01b039096168552949094525091902080549091019055565b816001146146a2576040805162461bcd60e51b815260206004820152601a60248201527f496e76656e746f72793a2077726f6e67204e46542076616c7565000000000000604482015290519081900360640190fd5b60008381526004602052604090205415614703576040805162461bcd60e51b815260206004820152601d60248201527f496e76656e746f72793a206578697374696e672f6275726e74204e4654000000604482015290519081900360640190fd5b60008381526004602052604090206001600160a01b0385169055806117e857600061472d84613cc6565b600090815260036020908152604080832080546001908101909155600283528184206001600160a01b038a16855283528184208054820190556006909252909120805490910190555050505050565b3b151590565b7fbc197c81000000000000000000000000000000000000000000000000000000006001600160a01b03851663bc197c816147ba612949565b888787876040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b03168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b8381101561484557818101518382015260200161482d565b50505050905001848103835286818151815260200191508051906020019060200280838360005b8381101561488457818101518382015260200161486c565b50505050905001848103825285818151815260200191508051906020019080838360005b838110156148c05781810151838201526020016148a8565b50505050905090810190601f1680156148ed5780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b15801561491257600080fd5b505af1158015614926573d6000803e3d6000fd5b505050506040513d602081101561493c57600080fd5b50516001600160e01b03191614611920576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a207472616e7366657220726566757365640000000000604482015290519081900360640190fd5b6060816149db575060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015261154c565b8160005b81156149f357600101600a820491506149df565b60608167ffffffffffffffff81118015614a0c57600080fd5b506040519080825280601f01601f191660200182016040528015614a37576020820181803683370190505b50859350905060001982015b8315614aa057600a840660300160f81b82828060019003935081518110614a6657fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350614a43565b50949350505050565b81614afb576040805162461bcd60e51b815260206004820152601560248201527f496e76656e746f72793a207a65726f2076616c75650000000000000000000000604482015290519081900360640190fd5b80614b4d576040805162461bcd60e51b815260206004820152601e60248201527f496e76656e746f72793a206e6f6e2d617070726f7665642073656e6465720000604482015290519081900360640190fd5b60008381526002602090815260408083206001600160a01b038816845290915290205482811015614bc5576040805162461bcd60e51b815260206004820152601d60248201527f496e76656e746f72793a206e6f7420656e6f7567682062616c616e6365000000604482015290519081900360640190fd5b60008481526002602090815260408083206001600160a01b0390981683529681528682209285900390925593845260039052509190208054919091039055565b82600114614c5a576040805162461bcd60e51b815260206004820152601a60248201527f496e76656e746f72793a2077726f6e67204e46542076616c7565000000000000604482015290519081900360640190fd5b6000848152600460205260409020546001600160a01b0386811690821614614cc9576040805162461bcd60e51b815260206004820152601860248201527f496e76656e746f72793a206e6f6e2d6f776e6564204e46540000000000000000604482015290519081900360640190fd5b82614d5a57600160a01b811615801590614d0957506000858152600760205260409020546001600160a01b0316614cfe612949565b6001600160a01b0316145b614d5a576040805162461bcd60e51b815260206004820152601e60248201527f496e76656e746f72793a206e6f6e2d617070726f7665642073656e6465720000604482015290519081900360640190fd5b60008581526004602052604090207fdead00000000000000000000000000000000000000000000000000000000000090558161360757614da486614d9d87613cc6565b60016155d9565b6001600160a01b03861660009081526006602052604090208054600019019055505050505050565b6001600160a01b038416614e27576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a207472616e7366657220746f207a65726f0000000000604482015290519081900360640190fd5b6000614e31612949565b90506000614e3f878361294d565b9050614e51878787600185600061580c565b84866001600160a01b0316886001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4856001600160a01b0316876001600160a01b0316836001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62886001604051808381526020018281526020019250505060405180910390a4614f02866001600160a01b031661477c565b15613fc257614f1086615269565b15614f2857614f23878787600188615331565b613fc2565b8215613fc257613fc287878787615445565b6001600160a01b038416614f95576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a207472616e7366657220746f207a65726f0000000000604482015290519081900360640190fd5b825182518114614fec576040805162461bcd60e51b815260206004820152601e60248201527f496e76656e746f72793a20696e636f6e73697374656e74206172726179730000604482015290519081900360640190fd5b6000614ff6612949565b90506000615004888361294d565b90506000806000805b8681146151235760008a828151811061502257fe5b6020026020010151905061503581613c92565b1561505f5761505a8d8d838d868151811061504c57fe5b60200260200101518a615699565b61511a565b6150688161282a565b15612ba25761508f8d8d838d868151811061507f57fe5b60200260200101518a600161580c565b808c6001600160a01b03168e6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a460006150db82613cc6565b9050856150ee5780955060019450615118565b858114615111576151018e8e888861599d565b9450600193929092019184615118565b8460010194505b505b5060010161500d565b508215615143576151368b8b858561599d565b81016151438b8b836159f1565b896001600160a01b03168b6001600160a01b031661515f612949565b6001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8c8c604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156151cf5781810151838201526020016151b7565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561520e5781810151838201526020016151f6565b5050505090500194505050505060405180910390a46152358a6001600160a01b031661477c565b15615247576152478b8b8b8b8b614782565b5050505050505050505050565b600061214c836001600160a01b038416615a3c565b604080517f4e2312e0000000000000000000000000000000000000000000000000000000006024808301919091528251808303909101815260449091018252602081810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a7000000000000000000000000000000000000000000000000000000001781528251935160008082529485948594909392908183858b612710fa955080519450505050609e5a1161531e57fe5b8280156153285750815b95945050505050565b7ff23a6e61000000000000000000000000000000000000000000000000000000006001600160a01b03851663f23a6e61615369612949565b888787876040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156153f55781810151838201526020016153dd565b50505050905090810190601f1680156154225780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b15801561491257600080fd5b7f150b7a02000000000000000000000000000000000000000000000000000000006001600160a01b03841663150b7a0261547d612949565b8786866040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156155025781810151838201526020016154ea565b50505050905090810190601f16801561552f5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561555157600080fd5b505af1158015615565573d6000803e3d6000fd5b505050506040513d602081101561557b57600080fd5b50516001600160e01b031916146117e8576040805162461bcd60e51b815260206004820152601b60248201527f496e76656e746f72793a207472616e7366657220726566757365640000000000604482015290519081900360640190fd5b60008281526002602090815260408083206001600160a01b0390961683529481528482208054849003905592815260039092529190208054919091039055565b8154600090821061565b5760405162461bcd60e51b8152600401808060200182810382526022815260200180615b9b6022913960400191505060405180910390fd5b82600001828154811061566a57fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b806156eb576040805162461bcd60e51b815260206004820152601e60248201527f496e76656e746f72793a206e6f6e2d617070726f7665642073656e6465720000604482015290519081900360640190fd5b8161573d576040805162461bcd60e51b815260206004820152601560248201527f496e76656e746f72793a207a65726f2076616c75650000000000000000000000604482015290519081900360640190fd5b60008381526002602090815260408083206001600160a01b0389168452909152902054828110156157b5576040805162461bcd60e51b815260206004820152601d60248201527f496e76656e746f72793a206e6f7420656e6f7567682062616c616e6365000000604482015290519081900360640190fd5b846001600160a01b0316866001600160a01b0316146136075760009384526002602090815260408086206001600160a01b039889168752909152808520918490039091559390941682529190208054909101905550565b82600114615861576040805162461bcd60e51b815260206004820152601a60248201527f496e76656e746f72793a2077726f6e67204e46542076616c7565000000000000604482015290519081900360640190fd5b6000848152600460205260409020546001600160a01b03878116908216146158d0576040805162461bcd60e51b815260206004820152601860248201527f496e76656e746f72793a206e6f6e2d6f776e6564204e46540000000000000000604482015290519081900360640190fd5b8261596157600160a01b81161580159061591057506000858152600760205260409020546001600160a01b0316615905612949565b6001600160a01b0316145b615961576040805162461bcd60e51b815260206004820152601e60248201527f496e76656e746f72793a206e6f6e2d617070726f7665642073656e6465720000604482015290519081900360640190fd5b60008581526004602052604090206001600160a01b038716905581613fc25761598c878760016159f1565b613fc2878761599a88613cc6565b60015b826001600160a01b0316846001600160a01b0316146117e85760009182526002602090815260408084206001600160a01b039687168552909152808320805483900390559290931681522080549091019055565b816001600160a01b0316836001600160a01b031614611852576001600160a01b0380841660009081526006602052604080822080548590039055918416815220805482019055505050565b60008181526001830160205260408120548015615af85783546000198083019190810190600090879083908110615a6f57fe5b9060005260206000200154905080876000018481548110615a8c57fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080615abc57fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506114d0565b60009150506114d0565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10615b435782800160ff19823516178555615b70565b82800160010185558215615b70579182015b82811115615b70578235825591602001919060010190615b55565b50615b7c929150615b80565b5090565b611d5691905b80821115615b7c5760008155600101615b8656fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212209e841bdddad73c1f10b8bdab736977aeeed7a9ba64193de66753a5260fa39e6264736f6c63430006080033

Verified Source Code Partial Match

Compiler: v0.6.8+commit.0bbfe453 EVM: istanbul Optimization: Yes (2000 runs)
REVVInventory.sol 3005 lines
// Sources flattened with hardhat v2.0.8 https://hardhat.org

// File @openzeppelin/contracts/utils/[email protected]

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <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;
        // solhint-disable-next-line no-inline-assembly
        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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}


// File @animoca/ethereum-contracts-assets_inventory/contracts/token/ERC721/[email protected]

pragma solidity 0.6.8;

/**
 * @title ERC721 Non-Fungible Token Standard, basic interface
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 * Note: The ERC-165 identifier for this interface is 0x80ac58cd.
 */
interface IERC721 {
    event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);

    event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);

    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);

    /**
     * Gets the balance of the specified address
     * @param owner address to query the balance of
     * @return balance uint256 representing the amount owned by the passed address
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * Gets the owner of the specified ID
     * @param tokenId uint256 ID to query the owner of
     * @return owner address currently marked as the owner of the given ID
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * Approves another address to transfer the given token ID
     * @dev The zero address indicates there is no approved address.
     * @dev There can only be one approved address per token at a given time.
     * @dev Can only be called by the token owner or an approved operator.
     * @param to address to be approved for the given token ID
     * @param tokenId uint256 ID of the token to be approved
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * Gets the approved address for a token ID, or zero if no address set
     * @dev Reverts if the token ID does not exist.
     * @param tokenId uint256 ID of the token to query the approval of
     * @return operator address currently approved for the given token ID
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * Sets or unsets the approval of a given operator
     * @dev An operator is allowed to transfer all tokens of the sender on their behalf
     * @param operator operator address to set the approval
     * @param approved representing the status of the approval to be set
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * Tells whether an operator is approved by a given owner
     * @param owner owner address which you want to query the approval of
     * @param operator operator address which you want to query the approval of
     * @return bool whether the given operator is approved by the given owner
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * Transfers the ownership of a given token ID to another address
     * @dev Usage of this method is discouraged, use `safeTransferFrom` whenever possible
     * @dev Requires the msg sender to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * Safely transfers the ownership of a given token ID to another address
     *
     * If the target address is a contract, it must implement `onERC721Received`,
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     *
     * @dev Requires the msg sender to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * Safely transfers the ownership of a given token ID to another address
     *
     * If the target address is a contract, it must implement `onERC721Received`,
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     *
     * @dev Requires the msg sender to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes data to send along with a safe transfer check
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}


// File @animoca/ethereum-contracts-assets_inventory/contracts/token/ERC721/[email protected]

pragma solidity 0.6.8;

/**
 * @title ERC721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 * Note: The ERC-165 identifier for this interface is 0x5b5e139f.
 */
interface IERC721Metadata {
    /**
     * @dev Gets the token name
     * @return string representing the token name
     */
    function name() external view returns (string memory);

    /**
     * @dev Gets the token symbol
     * @return string representing the token symbol
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns an URI for a given token ID
     * Throws if the token ID does not exist. May return an empty string.
     * @param tokenId uint256 ID of the token to query
     * @return string URI of given token ID
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}


// File @animoca/ethereum-contracts-assets_inventory/contracts/token/ERC721/[email protected]

pragma solidity 0.6.8;

/**
 * @title ERC721 Non-Fungible Token Standard, optional unsafe batchTransfer interface
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 * Note: The ERC-165 identifier for this interface is.
 */
interface IERC721BatchTransfer {
    /**
     * Unsafely transfers a batch of tokens.
     * @dev Usage of this method is discouraged, use `safeTransferFrom` whenever possible
     * @dev Reverts if `to` is the zero address.
     * @dev Reverts if the sender is not approved.
     * @dev Reverts if one of `tokenIds` is not owned by `from`.
     * @dev Resets the token approval for each of `tokenIds`.
     * @dev Emits an {IERC721-Transfer} event for each of `tokenIds`.
     * @param from Current tokens owner.
     * @param to Address of the new token owner.
     * @param tokenIds Identifiers of the tokens to transfer.
     */
    function batchTransferFrom(
        address from,
        address to,
        uint256[] calldata tokenIds
    ) external;
}


// File @animoca/ethereum-contracts-assets_inventory/contracts/token/ERC721/[email protected]

pragma solidity 0.6.8;

/**
    @title ERC721 Non-Fungible Token Standard, token receiver
    @dev See https://eips.ethereum.org/EIPS/eip-721
    Interface for any contract that wants to support safeTransfers from ERC721 asset contracts.
    Note: The ERC-165 identifier for this interface is 0x150b7a02.
 */
interface IERC721Receiver {
    /**
        @notice Handle the receipt of an NFT
        @dev The ERC721 smart contract calls this function on the recipient
        after a {IERC721-safeTransferFrom}. This function MUST return the function selector,
        otherwise the caller will revert the transaction. The selector to be
        returned can be obtained as `this.onERC721Received.selector`. This
        function MAY throw to revert and reject the transfer.
        Note: the ERC721 contract address is always the message sender.
        @param operator The address which called `safeTransferFrom` function
        @param from The address which previously owned the token
        @param tokenId The NFT identifier which is being transferred
        @param data Additional data with no specified format
        @return bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}


// File @openzeppelin/contracts/GSN/[email protected]

pragma solidity >=0.6.0 <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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}


// File @openzeppelin/contracts/introspection/[email protected]

pragma solidity >=0.6.0 <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 @animoca/ethereum-contracts-assets_inventory/contracts/token/ERC1155/[email protected]

pragma solidity 0.6.8;

/**
 * @title ERC-1155 Multi Token Standard, basic interface
 * @dev See https://eips.ethereum.org/EIPS/eip-1155
 * Note: The ERC-165 identifier for this interface is 0xd9b67a26.
 */
interface IERC1155 {
    event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value);

    event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values);

    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);

    event URI(string _value, uint256 indexed _id);

    /**
     * Safely transfers some token.
     * @dev Reverts if `to` is the zero address.
     * @dev Reverts if the sender is not approved.
     * @dev Reverts if `from` has an insufficient balance.
     * @dev Reverts if `to` is a contract and the call to {IERC1155TokenReceiver-onERC1155received} fails or is refused.
     * @dev Emits a `TransferSingle` event.
     * @param from Current token owner.
     * @param to Address of the new token owner.
     * @param id Identifier of the token to transfer.
     * @param value Amount of token to transfer.
     * @param data Optional data to send along to a receiver contract.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external;

    /**
     * Safely transfers a batch of tokens.
     * @dev Reverts if `to` is the zero address.
     * @dev Reverts if `ids` and `values` have different lengths.
     * @dev Reverts if the sender is not approved.
     * @dev Reverts if `from` has an insufficient balance for any of `ids`.
     * @dev Reverts if `to` is a contract and the call to {IERC1155TokenReceiver-onERC1155batchReceived} fails or is refused.
     * @dev Emits a `TransferBatch` event.
     * @param from Current token owner.
     * @param to Address of the new token owner.
     * @param ids Identifiers of the tokens to transfer.
     * @param values Amounts of tokens to transfer.
     * @param data Optional data to send along to a receiver contract.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external;

    /**
     * Retrieves the balance of `id` owned by account `owner`.
     * @param owner The account to retrieve the balance of.
     * @param id The identifier to retrieve the balance of.
     * @return The balance of `id` owned by account `owner`.
     */
    function balanceOf(address owner, uint256 id) external view returns (uint256);

    /**
     * Retrieves the balances of `ids` owned by accounts `owners`. For each pair:
     * @dev Reverts if `owners` and `ids` have different lengths.
     * @param owners The addresses of the token holders
     * @param ids The identifiers to retrieve the balance of.
     * @return The balances of `ids` owned by accounts `owners`.
     */
    function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) external view returns (uint256[] memory);

    /**
     * Enables or disables an operator's approval.
     * @dev Emits an `ApprovalForAll` event.
     * @param operator Address of the operator.
     * @param approved True to approve the operator, false to revoke an approval.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * Retrieves the approval status of an operator for a given owner.
     * @param owner Address of the authorisation giver.
     * @param operator Address of the operator.
     * @return True if the operator is approved, false if not.
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}


// File @animoca/ethereum-contracts-assets_inventory/contracts/token/ERC1155/[email protected]

pragma solidity 0.6.8;

/**
 * @title ERC-1155 Multi Token Standard, optional metadata URI extension
 * @dev See https://eips.ethereum.org/EIPS/eip-1155
 * Note: The ERC-165 identifier for this interface is 0x0e89341c.
 */
interface IERC1155MetadataURI {
    /**
     * @notice A distinct Uniform Resource Identifier (URI) for a given token.
     * @dev URIs are defined in RFC 3986.
     * @dev The URI MUST point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
     * @dev The uri function SHOULD be used to retrieve values if no event was emitted.
     * @dev The uri function MUST return the same value as the latest event for an _id if it was emitted.
     * @dev The uri function MUST NOT be used to check for the existence of a token as it is possible for
     *  an implementation to return a valid string even if the token does not exist.
     * @return URI string
     */
    function uri(uint256 id) external view returns (string memory);
}


// File @animoca/ethereum-contracts-assets_inventory/contracts/token/ERC1155/[email protected]

pragma solidity 0.6.8;

/**
 * @title ERC-1155 Multi Token Standard, optional Inventory extension
 * @dev See https://eips.ethereum.org/EIPS/eip-xxxx
 * Interface for fungible/non-fungible tokens management on a 1155-compliant contract.
 *
 * This interface rationalizes the co-existence of fungible and non-fungible tokens
 * within the same contract. As several kinds of fungible tokens can be managed under
 * the Multi-Token standard, we consider that non-fungible tokens can be classified
 * under their own specific type. We introduce the concept of non-fungible collection
 * and consider the usage of 3 types of identifiers:
 * (a) Fungible Token identifiers, each representing a set of Fungible Tokens,
 * (b) Non-Fungible Collection identifiers, each representing a set of Non-Fungible Tokens (this is not a token),
 * (c) Non-Fungible Token identifiers. 

 * Identifiers nature
 * |       Type                | isFungible  | isCollection | isToken |
 * |  Fungible Token           |   true      |     true     |  true   |
 * |  Non-Fungible Collection  |   false     |     true     |  false  |
 * |  Non-Fungible Token       |   false     |     false    |  true   |
 *
 * Identifiers compatibilities
 * |       Type                |  transfer  |   balance    |   supply    |  owner  |
 * |  Fungible Token           |    OK      |     OK       |     OK      |   NOK   |
 * |  Non-Fungible Collection  |    NOK     |     OK       |     OK      |   NOK   |
 * |  Non-Fungible Token       |    OK      |   0 or 1     |   0 or 1    |   OK    |
 *
 * Note: The ERC-165 identifier for this interface is 0x469bd23f.
 */
interface IERC1155Inventory {
    /**
     * Optional event emitted when a collection (Fungible Token or Non-Fungible Collection) is created.
     *  This event can be used by a client application to determine which identifiers are meaningful
     *  to track through the functions `balanceOf`, `balanceOfBatch` and `totalSupply`.
     * @dev This event MUST NOT be emitted twice for the same `collectionId`.
     */
    event CollectionCreated(uint256 indexed collectionId, bool indexed fungible);

    /**
     * Retrieves the owner of a non-fungible token (ERC721-compatible).
     * @dev Reverts if `nftId` is owned by the zero address.
     * @param nftId Identifier of the token to query.
     * @return Address of the current owner of the token.
     */
    function ownerOf(uint256 nftId) external view returns (address);

    /**
     * Introspects whether or not `id` represents a fungible token.
     *  This function MUST return true even for a fungible token which is not-yet created.
     * @param id The identifier to query.
     * @return bool True if `id` represents afungible token, false otherwise.
     */
    function isFungible(uint256 id) external pure returns (bool);

    /**
     * Introspects the non-fungible collection to which `nftId` belongs.
     * @dev This function MUST return a value representing a non-fungible collection.
     * @dev This function MUST return a value for a non-existing token, and SHOULD NOT be used to check the existence of a non-fungible token.
     * @dev Reverts if `nftId` does not represent a non-fungible token.
     * @param nftId The token identifier to query the collection of.
     * @return The non-fungible collection identifier to which `nftId` belongs.
     */
    function collectionOf(uint256 nftId) external pure returns (uint256);

    /**
     * Retrieves the total supply of `id`.
     * @param id The identifier for which to retrieve the supply of.
     * @return
     *  If `id` represents a collection (fungible token or non-fungible collection), the total supply for this collection.
     *  If `id` represents a non-fungible token, 1 if the token exists, else 0.
     */
    function totalSupply(uint256 id) external view returns (uint256);

    /**
     * @notice this documentation overrides {IERC1155-balanceOf(address,uint256)}.
     * Retrieves the balance of `id` owned by account `owner`.
     * @param owner The account to retrieve the balance of.
     * @param id The identifier to retrieve the balance of.
     * @return
     *  If `id` represents a collection (fungible token or non-fungible collection), the balance for this collection.
     *  If `id` represents a non-fungible token, 1 if the token is owned by `owner`, else 0.
     */
    // function balanceOf(address owner, uint256 id) external view returns (uint256);

    /**
     * @notice this documentation overrides {IERC1155-balanceOfBatch(address[],uint256[])}.
     * Retrieves the balances of `ids` owned by accounts `owners`.
     * @dev Reverts if `owners` and `ids` have different lengths.
     * @param owners The accounts to retrieve the balances of.
     * @param ids The identifiers to retrieve the balances of.
     * @return An array of elements such as for each pair `id`/`owner`:
     *  If `id` represents a collection (fungible token or non-fungible collection), the balance for this collection.
     *  If `id` represents a non-fungible token, 1 if the token is owned by `owner`, else 0.
     */
    // function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) external view returns (uint256[] memory);

    /**
     * @notice this documentation overrides its {IERC1155-safeTransferFrom(address,address,uint256,uint256,bytes)}.
     * Safely transfers some token.
     * @dev Reverts if `to` is the zero address.
     * @dev Reverts if the sender is not approved.
     * @dev Reverts if `id` does not represent a token.
     * @dev Reverts if `id` represents a non-fungible token and `value` is not 1.
     * @dev Reverts if `id` represents a non-fungible token and is not owned by `from`.
     * @dev Reverts if `id` represents a fungible token and `value` is 0.
     * @dev Reverts if `id` represents a fungible token and `from` has an insufficient balance.
     * @dev Reverts if `to` is a contract and the call to {IERC1155TokenReceiver-onERC1155received} fails or is refused.
     * @dev Emits an {IERC1155-TransferSingle} event.
     * @param from Current token owner.
     * @param to Address of the new token owner.
     * @param id Identifier of the token to transfer.
     * @param value Amount of token to transfer.
     * @param data Optional data to pass to the receiver contract.
     */
    // function safeTransferFrom(
    //     address from,
    //     address to,
    //     uint256 id,
    //     uint256 value,
    //     bytes calldata data
    // ) external;

    /**
     * @notice this documentation overrides its {IERC1155-safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)}.
     * Safely transfers a batch of tokens.
     * @dev Reverts if `to` is the zero address.
     * @dev Reverts if the sender is not approved.
     * @dev Reverts if one of `ids` does not represent a token.
     * @dev Reverts if one of `ids` represents a non-fungible token and `value` is not 1.
     * @dev Reverts if one of `ids` represents a non-fungible token and is not owned by `from`.
     * @dev Reverts if one of `ids` represents a fungible token and `value` is 0.
     * @dev Reverts if one of `ids` represents a fungible token and `from` has an insufficient balance.
     * @dev Reverts if one of `to` is a contract and the call to {IERC1155TokenReceiver-onERC1155batchReceived} fails or is refused.
     * @dev Emits an {IERC1155-TransferBatch} event.
     * @param from Current tokens owner.
     * @param to Address of the new tokens owner.
     * @param ids Identifiers of the tokens to transfer.
     * @param values Amounts of tokens to transfer.
     * @param data Optional data to pass to the receiver contract.
     */
    // function safeBatchTransferFrom(
    //     address from,
    //     address to,
    //     uint256[] calldata ids,
    //     uint256[] calldata values,
    //     bytes calldata data
    // ) external;
}


// File @animoca/ethereum-contracts-assets_inventory/contracts/token/ERC1155/[email protected]

pragma solidity 0.6.8;

/**
 * @title ERC-1155 Multi Token Standard, token receiver
 * @dev See https://eips.ethereum.org/EIPS/eip-1155
 * Interface for any contract that wants to support transfers from ERC1155 asset contracts.
 * Note: The ERC-165 identifier for this interface is 0x4e2312e0.
 */
interface IERC1155TokenReceiver {
    /**
     * @notice Handle the receipt of a single ERC1155 token type.
     * An ERC1155 contract MUST call this function on a recipient contract, at the end of a `safeTransferFrom` after the balance update.
     * This function MUST return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     *  (i.e. 0xf23a6e61) to accept the transfer.
     * Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
     * @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   `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @notice Handle the receipt of multiple ERC1155 token types.
     * An ERC1155 contract MUST call this function on a recipient contract, at the end of a `safeBatchTransferFrom` after the balance updates.
     * This function MUST return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     *  (i.e. 0xbc197c81) if to accept the transfer(s).
     * Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
     * @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)"))`
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}


// File @animoca/ethereum-contracts-assets_inventory/contracts/token/ERC1155/[email protected]

pragma solidity 0.6.8;






/**
 * @title ERC1155InventoryIdentifiersLib, a library to introspect inventory identifiers.
 * @dev With N=32, representing the Non-Fungible Collection mask length, identifiers are represented as follow:
 * (a) a Fungible Token:
 *     - most significant bit == 0
 * (b) a Non-Fungible Collection:
 *     - most significant bit == 1
 *     - (256-N) least significant bits == 0
 * (c) a Non-Fungible Token:
 *     - most significant bit == 1
 *     - (256-N) least significant bits != 0
 */
library ERC1155InventoryIdentifiersLib {
    // Non-fungible bit. If an id has this bit set, it is a non-fungible (either collection or token)
    uint256 internal constant _NF_BIT = 1 << 255;

    // Mask for non-fungible collection (including the nf bit)
    uint256 internal constant _NF_COLLECTION_MASK = uint256(type(uint32).max) << 224;
    uint256 internal constant _NF_TOKEN_MASK = ~_NF_COLLECTION_MASK;

    function isFungibleToken(uint256 id) internal pure returns (bool) {
        return id & _NF_BIT == 0;
    }

    function isNonFungibleToken(uint256 id) internal pure returns (bool) {
        return id & _NF_BIT != 0 && id & _NF_TOKEN_MASK != 0;
    }

    function getNonFungibleCollection(uint256 nftId) internal pure returns (uint256) {
        return nftId & _NF_COLLECTION_MASK;
    }
}

abstract contract ERC1155InventoryBase is IERC1155, IERC1155MetadataURI, IERC1155Inventory, IERC165, Context {
    using ERC1155InventoryIdentifiersLib for uint256;

    bytes4 private constant _ERC165_INTERFACE_ID = type(IERC165).interfaceId;
    bytes4 private constant _ERC1155_INTERFACE_ID = type(IERC1155).interfaceId;
    bytes4 private constant _ERC1155_METADATA_URI_INTERFACE_ID = type(IERC1155MetadataURI).interfaceId;
    bytes4 private constant _ERC1155_INVENTORY_INTERFACE_ID = type(IERC1155Inventory).interfaceId;

    // bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))
    bytes4 internal constant _ERC1155_RECEIVED = 0xf23a6e61;

    // bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))
    bytes4 internal constant _ERC1155_BATCH_RECEIVED = 0xbc197c81;

    // Burnt non-fungible token owner's magic value
    uint256 internal constant _BURNT_NFT_OWNER = 0xdead000000000000000000000000000000000000000000000000000000000000;

    /* owner => operator => approved */
    mapping(address => mapping(address => bool)) internal _operators;

    /* collection ID => owner => balance */
    mapping(uint256 => mapping(address => uint256)) internal _balances;

    /* collection ID => supply */
    mapping(uint256 => uint256) internal _supplies;

    /* NFT ID => owner */
    mapping(uint256 => uint256) internal _owners;

    /* collection ID => creator */
    mapping(uint256 => address) internal _creators;

    /// @dev See {IERC165-supportsInterface}.
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return
            interfaceId == _ERC165_INTERFACE_ID ||
            interfaceId == _ERC1155_INTERFACE_ID ||
            interfaceId == _ERC1155_METADATA_URI_INTERFACE_ID ||
            interfaceId == _ERC1155_INVENTORY_INTERFACE_ID;
    }

    //================================== ERC1155 =======================================/

    /// @dev See {IERC1155-balanceOf(address,uint256)}.
    function balanceOf(address owner, uint256 id) public view virtual override returns (uint256) {
        require(owner != address(0), "Inventory: zero address");

        if (id.isNonFungibleToken()) {
            return address(_owners[id]) == owner ? 1 : 0;
        }

        return _balances[id][owner];
    }

    /// @dev See {IERC1155-balanceOfBatch(address[],uint256[])}.
    function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) external view virtual override returns (uint256[] memory) {
        require(owners.length == ids.length, "Inventory: inconsistent arrays");

        uint256[] memory balances = new uint256[](owners.length);

        for (uint256 i = 0; i != owners.length; ++i) {
            balances[i] = balanceOf(owners[i], ids[i]);
        }

        return balances;
    }

    /// @dev See {IERC1155-setApprovalForAll(address,bool)}.
    function setApprovalForAll(address operator, bool approved) public virtual override {
        address sender = _msgSender();
        require(operator != sender, "Inventory: self-approval");
        _operators[sender][operator] = approved;
        emit ApprovalForAll(sender, operator, approved);
    }

    /// @dev See {IERC1155-isApprovedForAll(address,address)}.
    function isApprovedForAll(address tokenOwner, address operator) public view virtual override returns (bool) {
        return _operators[tokenOwner][operator];
    }

    //================================== ERC1155Inventory =======================================/

    /// @dev See {IERC1155Inventory-isFungible(uint256)}.
    function isFungible(uint256 id) external pure virtual override returns (bool) {
        return id.isFungibleToken();
    }

    /// @dev See {IERC1155Inventory-collectionOf(uint256)}.
    function collectionOf(uint256 nftId) external pure virtual override returns (uint256) {
        require(nftId.isNonFungibleToken(), "Inventory: not an NFT");
        return nftId.getNonFungibleCollection();
    }

    /// @dev See {IERC1155Inventory-ownerOf(uint256)}.
    function ownerOf(uint256 nftId) public view virtual override returns (address) {
        address owner = address(_owners[nftId]);
        require(owner != address(0), "Inventory: non-existing NFT");
        return owner;
    }

    /// @dev See {IERC1155Inventory-totalSupply(uint256)}.
    function totalSupply(uint256 id) external view virtual override returns (uint256) {
        if (id.isNonFungibleToken()) {
            return address(_owners[id]) == address(0) ? 0 : 1;
        } else {
            return _supplies[id];
        }
    }

    //================================== ABI-level Internal Functions =======================================/

    /**
     * Creates a collection (optional).
     * @dev Reverts if `collectionId` does not represent a collection.
     * @dev Reverts if `collectionId` has already been created.
     * @dev Emits a {IERC1155Inventory-CollectionCreated} event.
     * @param collectionId Identifier of the collection.
     */
    function _createCollection(uint256 collectionId) internal virtual {
        require(!collectionId.isNonFungibleToken(), "Inventory: not a collection");
        require(_creators[collectionId] == address(0), "Inventory: existing collection");
        _creators[collectionId] = _msgSender();
        emit CollectionCreated(collectionId, collectionId.isFungibleToken());
    }

    /// @dev See {IERC1155InventoryCreator-creator(uint256)}.
    function _creator(uint256 collectionId) internal view virtual returns (address) {
        require(!collectionId.isNonFungibleToken(), "Inventory: not a collection");
        return _creators[collectionId];
    }

    //================================== Internal Helper Functions =======================================/

    /**
     * Returns whether `sender` is authorised to make a transfer on behalf of `from`.
     * @param from The address to check operatibility upon.
     * @param sender The sender address.
     * @return True if sender is `from` or an operator for `from`, false otherwise.
     */
    function _isOperatable(address from, address sender) internal view virtual returns (bool) {
        return (from == sender) || _operators[from][sender];
    }

    /**
     * Calls {IERC1155TokenReceiver-onERC1155Received} on a target contract.
     * @dev Reverts if `to` is not a contract.
     * @dev Reverts if the call to the target fails or is refused.
     * @param from Previous token owner.
     * @param to New token owner.
     * @param id Identifier of the token transferred.
     * @param value Amount of token transferred.
     * @param data Optional data to send along with the receiver contract call.
     */
    function _callOnERC1155Received(
        address from,
        address to,
        uint256 id,
        uint256 value,
        bytes memory data
    ) internal {
        require(IERC1155TokenReceiver(to).onERC1155Received(_msgSender(), from, id, value, data) == _ERC1155_RECEIVED, "Inventory: transfer refused");
    }

    /**
     * Calls {IERC1155TokenReceiver-onERC1155batchReceived} on a target contract.
     * @dev Reverts if `to` is not a contract.
     * @dev Reverts if the call to the target fails or is refused.
     * @param from Previous tokens owner.
     * @param to New tokens owner.
     * @param ids Identifiers of the tokens to transfer.
     * @param values Amounts of tokens to transfer.
     * @param data Optional data to send along with the receiver contract call.
     */
    function _callOnERC1155BatchReceived(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) internal {
        require(
            IERC1155TokenReceiver(to).onERC1155BatchReceived(_msgSender(), from, ids, values, data) == _ERC1155_BATCH_RECEIVED,
            "Inventory: transfer refused"
        );
    }
}


// File @animoca/ethereum-contracts-assets_inventory/contracts/token/ERC1155721/[email protected]

pragma solidity 0.6.8;






/**
 * @title ERC1155721Inventory, an ERC1155Inventory with additional support for ERC721.
 */
abstract contract ERC1155721Inventory is IERC721, IERC721Metadata, IERC721BatchTransfer, ERC1155InventoryBase {
    using Address for address;

    bytes4 private constant _ERC165_INTERFACE_ID = type(IERC165).interfaceId;
    bytes4 private constant _ERC1155_TOKEN_RECEIVER_INTERFACE_ID = type(IERC1155TokenReceiver).interfaceId;
    bytes4 private constant _ERC721_INTERFACE_ID = type(IERC721).interfaceId;
    bytes4 private constant _ERC721_METADATA_INTERFACE_ID = type(IERC721Metadata).interfaceId;

    bytes4 internal constant _ERC721_RECEIVED = type(IERC721Receiver).interfaceId;

    uint256 internal constant _APPROVAL_BIT_TOKEN_OWNER_ = 1 << 160;

    /* owner => NFT balance */
    mapping(address => uint256) internal _nftBalances;

    /* NFT ID => operator */
    mapping(uint256 => address) internal _nftApprovals;

    /// @dev See {IERC165-supportsInterface(bytes4)}.
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return super.supportsInterface(interfaceId) || interfaceId == _ERC721_INTERFACE_ID || interfaceId == _ERC721_METADATA_INTERFACE_ID;
    }

    //===================================== ERC721 ==========================================/

    /// @dev See {IERC721-balanceOf(address)}.
    function balanceOf(address tokenOwner) external view virtual override returns (uint256) {
        require(tokenOwner != address(0), "Inventory: zero address");
        return _nftBalances[tokenOwner];
    }

    /// @dev See {IERC721-ownerOf(uint256)} and {IERC1155Inventory-ownerOf(uint256)}.
    function ownerOf(uint256 nftId) public view virtual override(IERC721, ERC1155InventoryBase) returns (address) {
        return ERC1155InventoryBase.ownerOf(nftId);
    }

    /// @dev See {IERC721-approve(address,uint256)}.
    function approve(address to, uint256 nftId) external virtual override {
        address tokenOwner = ownerOf(nftId);
        require(to != tokenOwner, "Inventory: self-approval");
        require(_isOperatable(tokenOwner, _msgSender()), "Inventory: non-approved sender");
        _owners[nftId] = uint256(tokenOwner) | _APPROVAL_BIT_TOKEN_OWNER_;
        _nftApprovals[nftId] = to;
        emit Approval(tokenOwner, to, nftId);
    }

    /// @dev See {IERC721-getApproved(uint256)}.
    function getApproved(uint256 nftId) external view virtual override returns (address) {
        uint256 tokenOwner = _owners[nftId];
        require(address(tokenOwner) != address(0), "Inventory: non-existing NFT");
        if (tokenOwner & _APPROVAL_BIT_TOKEN_OWNER_ != 0) {
            return _nftApprovals[nftId];
        } else {
            return address(0);
        }
    }

    /// @dev See {IERC721-isApprovedForAll(address,address)} and {IERC1155-isApprovedForAll(address,address)}
    function isApprovedForAll(address tokenOwner, address operator) public view virtual override(IERC721, ERC1155InventoryBase) returns (bool) {
        return ERC1155InventoryBase.isApprovedForAll(tokenOwner, operator);
    }

    /// @dev See {IERC721-isApprovedForAll(address,address)} and {IERC1155-isApprovedForAll(address,address)}
    function setApprovalForAll(address operator, bool approved) public virtual override(IERC721, ERC1155InventoryBase) {
        return ERC1155InventoryBase.setApprovalForAll(operator, approved);
    }

    /**
     * Unsafely transfers a Non-Fungible Token (ERC721-compatible).
     * @dev See {IERC1155721Inventory-transferFrom(address,address,uint256)}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 nftId
    ) public virtual override {
        _transferFrom(
            from,
            to,
            nftId,
            "",
            /* safe */
            false
        );
    }

    /**
     * Safely transfers a Non-Fungible Token (ERC721-compatible).
     * @dev See {IERC1155721Inventory-safeTransferFrom(address,address,uint256)}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 nftId
    ) public virtual override {
        _transferFrom(
            from,
            to,
            nftId,
            "",
            /* safe */
            true
        );
    }

    /**
     * Safely transfers a Non-Fungible Token (ERC721-compatible).
     * @dev See {IERC1155721Inventory-safeTransferFrom(address,address,uint256,bytes)}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 nftId,
        bytes memory data
    ) public virtual override {
        _transferFrom(
            from,
            to,
            nftId,
            data,
            /* safe */
            true
        );
    }

    /**
     * Unsafely transfers a batch of Non-Fungible Tokens (ERC721-compatible).
     * @dev See {IERC1155721BatchTransfer-batchTransferFrom(address,address,uint256[])}.
     */
    function batchTransferFrom(
        address from,
        address to,
        uint256[] memory nftIds
    ) public virtual override {
        require(to != address(0), "Inventory: transfer to zero");
        address sender = _msgSender();
        bool operatable = _isOperatable(from, sender);

        uint256 length = nftIds.length;
        uint256[] memory values = new uint256[](length);

        uint256 nfCollectionId;
        uint256 nfCollectionCount;
        for (uint256 i; i != length; ++i) {
            uint256 nftId = nftIds[i];
            values[i] = 1;
            _transferNFT(from, to, nftId, 1, operatable, true);
            emit Transfer(from, to, nftId);
            uint256 nextCollectionId = nftId.getNonFungibleCollection();
            if (nfCollectionId == 0) {
                nfCollectionId = nextCollectionId;
                nfCollectionCount = 1;
            } else {
                if (nextCollectionId != nfCollectionId) {
                    _transferNFTUpdateCollection(from, to, nfCollectionId, nfCollectionCount);
                    nfCollectionId = nextCollectionId;
                ...

// [truncated — 115861 bytes total]

Read Contract

DEFAULT_ADMIN_ROLE 0xa217fddf → bytes32
balanceOf 0x00fdd58e → uint256
balanceOf 0x70a08231 → uint256
balanceOfBatch 0x4e1273f4 → uint256[]
baseMetadataURI 0x5b2bd79e → string
collectionOf 0xc7778baa → uint256
creator 0x510b5158 → address
getApproved 0x081812fc → address
getRoleAdmin 0x248a9ca3 → bytes32
getRoleMember 0x9010d07c → address
getRoleMemberCount 0xca15c873 → uint256
hasRole 0x91d14854 → bool
isApprovedForAll 0xe985e9c5 → bool
isFungible 0xadebf6f2 → bool
isMinter 0xaa271e1a → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0xbd85b039 → uint256
uri 0x0e89341c → string

Write Contract 27 functions

These functions modify contract state and require a wallet transaction to execute.

addMinter 0x983b2d56
address account
approve 0x095ea7b3
address to
uint256 nftId
batchBurnFrom 0x80534934
address from
uint256[] ids
uint256[] values
batchBurnFrom 0xf2472965
address from
uint256[] nftIds
batchMint 0x4684d7e9
address to
uint256[] nftIds
batchTransferFrom 0xf3993d11
address from
address to
uint256[] nftIds
burnFrom 0x124d91e5
address from
uint256 id
uint256 value
createCollection 0xd0011d9d
uint256 collectionId
grantRole 0x2f2ff15d
bytes32 role
address account
mint 0x40c10f19
address to
uint256 nftId
pause 0x8456cb59
No parameters
renounceMinter 0x98650275
No parameters
renounceOwnership 0x715018a6
No parameters
renounceRole 0x36568abe
bytes32 role
address account
revokeRole 0xd547741f
bytes32 role
address account
safeBatchMint 0x0d6a5bbb
address to
uint256[] ids
uint256[] values
bytes data
safeBatchTransferFrom 0x2eb2c2d6
address from
address to
uint256[] ids
uint256[] values
bytes data
safeMint 0x5cfa9297
address to
uint256 id
uint256 value
bytes data
safeMint 0x8832e6e3
address to
uint256 nftId
bytes data
safeTransferFrom 0x42842e0e
address from
address to
uint256 nftId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 nftId
bytes data
safeTransferFrom 0xf242432a
address from
address to
uint256 id
uint256 value
bytes data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseMetadataURI 0x7e518ec8
string baseMetadataURI_
transferFrom 0x23b872dd
address from
address to
uint256 nftId
transferOwnership 0xf2fde38b
address newOwner
unpause 0x3f4ba83a
No parameters

Recent Transactions

No transactions found for this address