Forkchoice Ethereum Mainnet

Address Contract Partially Verified

Address 0x3edf71a31b80Ff6a45Fdb0858eC54DE98dF047AA
Balance 0.090000 ETH ($177.25)
Nonce 1
Code Size 23064 bytes
Indexed Transactions 0 (1 on-chain, 1.4% indexed)
External Etherscan · Sourcify

Contract Bytecode

23064 bytes
Copy Bytecode
0x6080604052600436106101e25760003560e01c80638da5cb5b11610102578063cd53d08e11610095578063f242432a11610064578063f242432a14611144578063f2fde38b14611260578063f4d9fecc146112b1578063f59e754c14611300576101e2565b8063cd53d08e14610f2d578063d2a6b51a14610fa8578063d96a094a1461108d578063e985e9c5146110bb576101e2565b8063a22cb465116100d1578063a22cb46514610e0b578063a8c5ba8114610e68578063b876130114610ea3578063bd85b03914610ede576101e2565b80638da5cb5b14610cde5780638f32d59b14610d3557806395d89b4114610d645780639751290514610df4576101e2565b806340ffae2e1161017a5780634e1273f4116101495780634e1273f41461098e578063669c008314610b3c578063715018a614610bff5780637e518ec814610c16576101e2565b806340ffae2e146106e1578063431f21da14610822578063454a2ab31461087b5780634cd365cb146108a9576101e2565b806314525b6b116101b657806314525b6b1461040c5780632693ebf2146104375780632ad71573146104865780632eb2c2d6146104b1576101e2565b8062fdd58e146101e757806301ffc9a71461025657806306fdde03146102c85780630e89341c14610358575b600080fd5b3480156101f357600080fd5b506102406004803603604081101561020a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061133b565b6040518082815260200191505060405180910390f35b34801561026257600080fd5b506102ae6004803603602081101561027957600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611395565b604051808215151515815260200191505060405180910390f35b3480156102d457600080fd5b506102dd611446565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561031d578082015181840152602081019050610302565b50505050905090810190601f16801561034a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561036457600080fd5b506103916004803603602081101561037b57600080fd5b81019080803590602001909291905050506114e4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d15780820151818401526020810190506103b6565b50505050905090810190601f1680156103fe5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561041857600080fd5b506104216115f7565b6040518082815260200191505060405180910390f35b34801561044357600080fd5b506104706004803603602081101561045a57600080fd5b81019080803590602001909291905050506115fd565b6040518082815260200191505060405180910390f35b34801561049257600080fd5b5061049b611615565b6040518082815260200191505060405180910390f35b3480156104bd57600080fd5b506106df600480360360a08110156104d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561053157600080fd5b82018360208201111561054357600080fd5b8035906020019184602083028401116401000000008311171561056557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156105c557600080fd5b8201836020820111156105d757600080fd5b803590602001918460208302840111640100000000831117156105f957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561065957600080fd5b82018360208201111561066b57600080fd5b8035906020019184600183028401116401000000008311171561068d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061161b565b005b61080c600480360360808110156106f757600080fd5b81019080803590602001909291908035906020019064010000000081111561071e57600080fd5b82018360208201111561073057600080fd5b8035906020019184600183028401116401000000008311171561075257600080fd5b90919293919293908035906020019064010000000081111561077357600080fd5b82018360208201111561078557600080fd5b803590602001918460018302840111640100000000831117156107a757600080fd5b9091929391929390803590602001906401000000008111156107c857600080fd5b8201836020820111156107da57600080fd5b803590602001918460018302840111640100000000831117156107fc57600080fd5b9091929391929390505050611756565b6040518082815260200191505060405180910390f35b34801561082e57600080fd5b506108796004803603608081101561084557600080fd5b8101908080359060200190929190803590602001909291908035906020019092919080359060200190929190505050611ac4565b005b6108a76004803603602081101561089157600080fd5b8101908080359060200190929190505050611ec3565b005b3480156108b557600080fd5b5061098c600480360360608110156108cc57600080fd5b8101908080359060200190929190803590602001906401000000008111156108f357600080fd5b82018360208201111561090557600080fd5b8035906020019184600183028401116401000000008311171561092757600080fd5b90919293919293908035906020019064010000000081111561094857600080fd5b82018360208201111561095a57600080fd5b8035906020019184600183028401116401000000008311171561097c57600080fd5b9091929391929390505050612210565b005b34801561099a57600080fd5b50610ae5600480360360408110156109b157600080fd5b81019080803590602001906401000000008111156109ce57600080fd5b8201836020820111156109e057600080fd5b80359060200191846020830284011164010000000083111715610a0257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610a6257600080fd5b820183602082011115610a7457600080fd5b80359060200191846020830284011164010000000083111715610a9657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050612585565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610b28578082015181840152602081019050610b0d565b505050509050019250505060405180910390f35b348015610b4857600080fd5b50610b7560048036036020811015610b5f57600080fd5b81019080803590602001909291905050506126cb565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018281526020019550505050505060405180910390f35b348015610c0b57600080fd5b50610c14612741565b005b348015610c2257600080fd5b50610cdc60048036036020811015610c3957600080fd5b8101908080359060200190640100000000811115610c5657600080fd5b820183602082011115610c6857600080fd5b80359060200191846001830284011164010000000083111715610c8a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612813565b005b348015610cea57600080fd5b50610cf36128c5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610d4157600080fd5b50610d4a6128ef565b604051808215151515815260200191505060405180910390f35b348015610d7057600080fd5b50610d79612947565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610db9578082015181840152602081019050610d9e565b50505050905090810190601f168015610de65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610e0057600080fd5b50610e096129e5565b005b348015610e1757600080fd5b50610e6660048036036040811015610e2e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050612ab7565b005b348015610e7457600080fd5b50610ea160048036036020811015610e8b57600080fd5b8101908080359060200190929190505050612bb8565b005b348015610eaf57600080fd5b50610edc60048036036020811015610ec657600080fd5b8101908080359060200190929190505050612c68565b005b348015610eea57600080fd5b50610f1760048036036020811015610f0157600080fd5b81019080803590602001909291905050506134cd565b6040518082815260200191505060405180910390f35b348015610f3957600080fd5b50610f6660048036036020811015610f5057600080fd5b81019080803590602001909291905050506134ea565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610fb457600080fd5b5061108b60048036036040811015610fcb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561100857600080fd5b82018360208201111561101a57600080fd5b8035906020019184602083028401116401000000008311171561103c57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061351d565b005b6110b9600480360360208110156110a357600080fd5b81019080803590602001909291905050506135e7565b005b3480156110c757600080fd5b5061112a600480360360408110156110de57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613ac0565b604051808215151515815260200191505060405180910390f35b34801561115057600080fd5b5061125e600480360360a081101561116757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156111d857600080fd5b8201836020820111156111ea57600080fd5b8035906020019184600183028401116401000000008311171561120c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613c2f565b005b34801561126c57600080fd5b506112af6004803603602081101561128357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613d6a565b005b3480156112bd57600080fd5b506112fe600480360360608110156112d457600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050613d87565b005b34801561130c57600080fd5b506113396004803603602081101561132357600080fd5b81019080803590602001909291905050506140b8565b005b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b60006301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061142e575063d9b67a2660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b1561143c5760019050611441565b600090505b919050565b600c8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156114dc5780601f106114b1576101008083540402835291602001916114dc565b820191906000526020600020905b8154815290600101906020018083116114bf57829003601f168201915b505050505081565b60606114ef826141df565b611544576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806158316025913960400191505060405180910390fd5b6115f060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115dd5780601f106115b2576101008083540402835291602001916115dd565b820191906000526020600020905b8154815290600101906020018083116115c057829003601f168201915b50505050506115eb8461424b565b614378565b9050919050565b600f5481565b600b6020528060005260406000206000915090505481565b600e5481565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061165b575061165a8533613ac0565b5b6116b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180615882602f913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415611736576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806158016030913960400191505060405180910390fd5b611742858585856143bc565b61174f8585858585614721565b5050505050565b60008088116117cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f43616e6e6f74207072696e74203020706965636573210000000000000000000081525060200191505060405180910390fd5b8760045402341015611847576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f496e73756666696369656e742042616c616e636500000000000000000000000081525060200191505060405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163460405180600001905060006040518083038185875af1925050503d80600081146118c7576040519150601f19603f3d011682016040523d82523d6000602084013e6118cc565b606091505b50505060006118d9614a14565b90506118e3614a31565b33600a600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008686905011156119a657807f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b878760405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a25b6119f633828b87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050614a45565b88600b6000838152602001908152602001600020819055507f7f4300e9b32fc7c8d6d3e1fcb2fdfa59b363691a535909f2d72b4faaf50140dc818a8a8a3360405180868152602001858152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050965050505050505060405180910390a180915050979650505050505050565b8181806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000848152602001908152602001600020541015611b6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806158b1602f913960400191505060405180910390fd5b844210611be3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f41756374696f6e2044617465205061737365640000000000000000000000000081525060200191505060405180910390fd5b8462127500420111611c5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f41756374696f6e204461746520546f6f2046617200000000000000000000000081525060200191505060405180910390fd5b60008611611cd3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f41756374696f6e2050726963652043616e6e6f7420426520300000000000000081525060200191505060405180910390fd5b60008090505b83811015611eba57611cfe333087600160405180602001604052806000815250613c2f565b6040518060a001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018781526020018681525060106000600e54815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030155608082015181600401559050507f0eea1fe6c42f98615e077fa21cedc5e2a85335a287a5f30bed61a0b8f70787af338689600e548a604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481526020018381526020018281526020019550505050505060405180910390a1600e600081548092919060010191905055508080600101915050611cd9565b50505050505050565b42601060008381526020019081526020016000206003015411611ee557600080fd5b34662386f26fc100006010600084815260200190815260200160002060020154011115611f1157600080fd5b6010600082815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611f8057600080fd5b6010600082815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611fef57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff166010600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461210c576010600082815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16601060008381526020019081526020016000206002015460405180600001905060006040518083038185875af1925050503d8060008114612103576040519150601f19603f3d011682016040523d82523d6000602084013e612108565b606091505b5050505b346010600083815260200190815260200160002060020181905550336010600083815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f4dcc013473324698bfbe263facec4ea4b1bc43624236542deabec62c2122b3053360106000848152602001908152602001600020600401548334604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200194505050505060405180910390a150565b60001515600660149054906101000a900460ff16151514612299576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f496d706f727473204c6f636b656400000000000000000000000000000000000081525060200191505060405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd336000886040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b15801561237757600080fd5b505af115801561238b573d6000803e3d6000fd5b505050506000612399614a14565b90506123a3614a31565b33600a600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600085859050111561246657807f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b868660405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a25b6124b73382600186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050614a45565b6001600b6000838152602001908152602001600020819055507f7f4300e9b32fc7c8d6d3e1fcb2fdfa59b363691a535909f2d72b4faaf50140dc8160013360405180848152602001838152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281038252600c8152602001807f496d706f7274656420417274000000000000000000000000000000000000000081525060200194505050505060405180910390a1505050505050565b606081518351146125e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180615856602c913960400191505060405180910390fd5b606083516040519080825280602002602001820160405280156126135781602001602082028038833980820191505090505b50905060008090505b84518110156126c05760008086838151811061263457fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085838151811061268457fe5b60200260200101518152602001908152602001600020548282815181106126a757fe5b602002602001018181525050808060010191505061261c565b508091505092915050565b60106020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040154905085565b6127496128ef565b61275257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146128b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806158e0602e913960400191505060405180910390fd5b6128c281614b93565b50565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b600d8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156129dd5780601f106129b2576101008083540402835291602001916129dd565b820191906000526020600020905b8154815290600101906020018083116129c057829003601f168201915b505050505081565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612a8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806158e0602e913960400191505060405180910390fd5b600660149054906101000a900460ff1615600660146101000a81548160ff021916908315150217905550565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051808215151515815260200191505060405180910390a35050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612c5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806158e0602e913960400191505060405180910390fd5b8060048190555050565b42601060008381526020019081526020016000206003015410612cf3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f41756374696f6e204e6f7420457870697265640000000000000000000000000081525060200191505060405180910390fd5b600060106000838152602001908152602001600020600201541415612d80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f41756374696f6e20436f6e636c7564656400000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166010600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146131e9573073ffffffffffffffffffffffffffffffffffffffff1663f242432a306010600085815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16601060008681526020019081526020016000206004015460016040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020018060200182810382526000815260200160200195505050505050600060405180830381600087803b158015612f0e57600080fd5b505af1158015612f22573d6000803e3d6000fd5b5050505060006103e8600f5460106000858152602001908152602001600020600201540281612f4d57fe5b049050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168160405180600001905060006040518083038185875af1925050503d8060008114612fd0576040519150601f19603f3d011682016040523d82523d6000602084013e612fd5565b606091505b5050506010600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661304e826010600086815260200190815260200160002060020154614bad90919063ffffffff16565b60405180600001905060006040518083038185875af1925050503d8060008114613094576040519150601f19603f3d011682016040523d82523d6000602084013e613099565b606091505b5050507f8785514ea53c6c269e8aeffae98a347f0317c95397a131044a727f2e2337a927601060008481526020019081526020016000206004015460106000858152602001908152602001600020600201546010600086815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166010600087815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1686604051808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019550505050505060405180910390a150613458565b3073ffffffffffffffffffffffffffffffffffffffff1663f242432a306010600085815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16601060008681526020019081526020016000206004015460016040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020018060200182810382526000815260200160200195505050505050600060405180830381600087803b15801561330d57600080fd5b505af1158015613321573d6000803e3d6000fd5b505050507f8785514ea53c6c269e8aeffae98a347f0317c95397a131044a727f2e2337a927601060008381526020019081526020016000206004015460006010600085815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166010600086815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685604051808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019550505050505060405180910390a15b60006010600083815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000601060008381526020019081526020016000206002018190555050565b6000600b6000838152602001908152602001600020549050919050565b600a6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156135a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180615987602c913960400191505060405180910390fd5b60008090505b81518110156135e25760008282815181106135c057fe5b602002602001015190506135d48482614c36565b5080806001019150506135a9565b505050565b4260106000838152602001908152602001600020600301541061360957600080fd5b346010600083815260200190815260200160002060020154111561362c57600080fd5b6010600082815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff161461369b57600080fd5b60006010600083815260200190815260200160002060020154116136be57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff1663f242432a3033601060008681526020019081526020016000206004015460016040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020018060200182810382526000815260200160200195505050505050600060405180830381600087803b1580156137ac57600080fd5b505af11580156137c0573d6000803e3d6000fd5b5050505060006103e8600f54601060008581526020019081526020016000206002015402816137eb57fe5b049050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168160405180600001905060006040518083038185875af1925050503d806000811461386e576040519150601f19603f3d011682016040523d82523d6000602084013e613873565b606091505b5050506010600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166138ec826010600086815260200190815260200160002060020154614bad90919063ffffffff16565b60405180600001905060006040518083038185875af1925050503d8060008114613932576040519150601f19603f3d011682016040523d82523d6000602084013e613937565b606091505b5050507f8785514ea53c6c269e8aeffae98a347f0317c95397a131044a727f2e2337a927601060008481526020019081526020016000206004015460106000858152602001908152602001600020600201546010600086815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163386604051808681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019550505050505060405180910390a1336010600084815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600060106000848152602001908152602001600020600201819055505050565b600080600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1663c4552791866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015613b7c57600080fd5b505afa158015613b90573d6000803e3d6000fd5b505050506040513d6020811015613ba657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161415613bdd576001915050613c29565b8273ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415613c1b576001915050613c29565b613c258484614d45565b9150505b92915050565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480613c6f5750613c6e8533613ac0565b5b613cc4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806157a2602a913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415613d4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180615777602b913960400191505060405180910390fd5b613d5685858585614dd9565b613d638585858585614fcd565b5050505050565b613d726128ef565b613d7b57600080fd5b613d848161523e565b50565b6010600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613e5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f596f7520446f6e74204f776e20546869732041756374696f6e2100000000000081525060200191505060405180910390fd5b6010600084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1614613f36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f536f6d656f6e6520576f6e20546869732041756374696f6e210000000000000081525060200191505060405180910390fd5b42601060008581526020019081526020016000206003015410613fc1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f41756374696f6e204973205374696c6c2052756e6e696e67000000000000000081525060200191505060405180910390fd5b428211614036576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f41756374696f6e2044617465205061737365640000000000000000000000000081525060200191505060405180910390fd5b8160106000858152602001908152602001600020600301819055508060106000858152602001908152602001600020600201819055507f4e61e861fbd4e4dbb19801c1a16f1a620c774229f739a332716ca391cfa9730883838360405180848152602001838152602001828152602001935050505060405180910390a1505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461415e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806158e0602e913960400191505060405180910390fd5b6103e881106141d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f46656520546f6f2048696768210000000000000000000000000000000000000081525060200191505060405180910390fd5b80600f8190555050565b60008073ffffffffffffffffffffffffffffffffffffffff16600a600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b60606000821415614293576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050614373565b600082905060005b600082146142bd578080600101915050600a82816142b557fe5b04915061429b565b6060816040519080825280601f01601f1916602001820160405280156142f25781602001600182028038833980820191505090505b50905060006001830390505b6000861461436b57600a868161431057fe5b0660300160f81b8282806001900393508151811061432a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a868161436357fe5b0495506142fe565b819450505050505b919050565b60606143b48383604051806020016040528060008152506040518060200160405280600081525060405180602001604052806000815250615338565b905092915050565b8051825114614416576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260358152602001806157cc6035913960400191505060405180910390fd5b60008251905060008090505b81811015614613576144b283828151811061443957fe5b60200260200101516000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600087858151811061448d57fe5b6020026020010151815260200190815260200160002054614bad90919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008684815181106144fe57fe5b60200260200101518152602001908152602001600020819055506145a083828151811061452757fe5b60200260200101516000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600087858151811061457b57fe5b60200260200101518152602001908152602001600020546155fe90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008684815181106145ec57fe5b60200260200101518152602001908152602001600020819055508080600101915050614422565b508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156146c35780820151818401526020810190506146a8565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156147055780820151818401526020810190506146ea565b5050505090500194505050505060405180910390a45050505050565b6147408473ffffffffffffffffffffffffffffffffffffffff16615686565b801561477857503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15614a0d5760008473ffffffffffffffffffffffffffffffffffffffff1663bc197c8133888787876040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b8381101561485e578082015181840152602081019050614843565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156148a0578082015181840152602081019050614885565b50505050905001848103825285818151815260200191508051906020019080838360005b838110156148df5780820151818401526020810190506148c4565b50505050905090810190601f16801561490c5780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b15801561493157600080fd5b505af1158015614945573d6000803e3d6000fd5b505050506040513d602081101561495b57600080fd5b8101908080519060200190929190505050905063bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614614a0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603f81526020018061590e603f913960400191505060405180910390fd5b505b5050505050565b6000614a2c60016009546155fe90919063ffffffff16565b905090565b600960008154809291906001019190505550565b614aa7826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000868152602001908152602001600020546155fe90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000858152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628686604051808381526020018281526020019250505060405180910390a4614b8d600085858585614fcd565b50505050565b8060029080519060200190614ba99291906156d1565b5050565b600082821115614c25576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f536166654d617468237375623a20554e444552464c4f5700000000000000000081525060200191505060405180910390fd5b600082840390508091505092915050565b803373ffffffffffffffffffffffffffffffffffffffff16600a600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614cee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001806159b36031913960400191505060405180910390fd5b82600a600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b614e3b816000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002054614bad90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550614ef0816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000858152602001908152602001600020546155fe90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000848152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051808381526020018281526020019250505060405180910390a450505050565b614fec8473ffffffffffffffffffffffffffffffffffffffff16615686565b801561502457503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156152375760008473ffffffffffffffffffffffffffffffffffffffff1663f23a6e6133888787876040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561510b5780820151818401526020810190506150f0565b50505050905090810190601f1680156151385780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b15801561515b57600080fd5b505af115801561516f573d6000803e3d6000fd5b505050506040513d602081101561518557600080fd5b8101908080519060200190929190505050905063f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614615235576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a81526020018061594d603a913960400191505060405180910390fd5b505b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561527857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6060808690506060869050606086905060608690506060869050606081518351855187518951010101016040519080825280601f01601f1916602001820160405280156153945781602001600182028038833980820191505090505b5090506060819050600080905060008090505b8851811015615415578881815181106153bc57fe5b602001015160f81c60f81b8383806001019450815181106153d957fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806001019150506153a7565b5060008090505b875181101561548a5787818151811061543157fe5b602001015160f81c60f81b83838060010194508151811061544e57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808060010191505061541c565b5060008090505b86518110156154ff578681815181106154a657fe5b602001015160f81c60f81b8383806001019450815181106154c357fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050615491565b5060008090505b85518110156155745785818151811061551b57fe5b602001015160f81c60f81b83838060010194508151811061553857fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050615506565b5060008090505b84518110156155e95784818151811061559057fe5b602001015160f81c60f81b8383806001019450815181106155ad57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808060010191505061557b565b50819850505050505050505095945050505050565b60008082840190508381101561567c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f536166654d617468236164643a204f564552464c4f570000000000000000000081525060200191505060405180910390fd5b8091505092915050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91506000801b82141580156156c85750808214155b92505050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061571257805160ff1916838001178555615740565b82800160010185558215615740579182015b8281111561573f578251825591602001919060010190615724565b5b50905061574d9190615751565b5090565b61577391905b8082111561576f576000816000905550600101615757565b5090565b9056fe4552433131353523736166655472616e7366657246726f6d3a20494e56414c49445f524543495049454e544552433131353523736166655472616e7366657246726f6d3a20494e56414c49445f4f50455241544f5245524331313535235f7361666542617463685472616e7366657246726f6d3a20494e56414c49445f4152524159535f4c454e47544845524331313535237361666542617463685472616e7366657246726f6d3a20494e56414c49445f524543495049454e544552433732315472616461626c65237572693a204e4f4e4558495354454e545f544f4b454e455243313135352362616c616e63654f6642617463683a20494e56414c49445f41525241595f4c454e47544845524331313535237361666542617463685472616e7366657246726f6d3a20494e56414c49445f4f50455241544f52455243313135355472616461626c65236f776e6572734f6e6c793a204f4e4c595f4f574e4552535f414c4c4f574544455243313135355472616461626c65236f776e6572734f6e6c793a204f4e4c595f41444d494e5f414c4c4f57454445524331313535235f63616c6c6f6e45524331313535426174636852656365697665643a20494e56414c49445f4f4e5f524543454956455f4d45535341474545524331313535235f63616c6c6f6e4552433131353552656365697665643a20494e56414c49445f4f4e5f524543454956455f4d455353414745455243313135355472616461626c652373657443726561746f723a20494e56414c49445f414444524553532e455243313135355472616461626c652363726561746f724f6e6c793a204f4e4c595f43524541544f525f414c4c4f574544a265627a7a72315820a9c0d3fb368ac9b137e4b0a8638687fd32ccdc4d1909f5d738ff0bf4b4f137ec64736f6c634300050c0032

Verified Source Code Partial Match

Compiler: v0.5.12+commit.7709ece9 EVM: petersburg Optimization: No
BAE.sol 1272 lines
// File: openzeppelin-solidity\contracts\ownership\Ownable.sol

pragma solidity ^0.5.0;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);   

    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    constructor () internal {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @return the address of the owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner());
        _;
    }

    /**
     * @return true if `msg.sender` is the owner of the contract.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Allows the current owner to relinquish control of the contract.
     * @notice Renouncing to ownership will leave the contract without an owner.
     * It will not be possible to call the functions with the `onlyOwner`
     * modifier anymore.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0));
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: contracts\multi-token-standard\interfaces\IERC165.sol

pragma solidity ^0.5.12;


/**
 * @title ERC165
 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md
 */
interface IERC165 {

    /**
     * @notice Query if a contract implements an interface
     * @dev Interface identification is specified in ERC-165. This function
     * uses less than 30,000 gas
     * @param _interfaceId The interface identifier, as specified in ERC-165
     */
    function supportsInterface(bytes4 _interfaceId)
    external
    view
    returns (bool);
}

// File: contracts\multi-token-standard\utils\SafeMath.sol

pragma solidity ^0.5.12;


/**
 * @title SafeMath
 * @dev Unsigned math operations with safety checks that revert on error
 */
library SafeMath {

  /**
   * @dev Multiplies two unsigned integers, reverts on overflow.
   */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b, "SafeMath#mul: OVERFLOW");

    return c;
  }

  /**
   * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
   */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, "SafeMath#div: DIVISION_BY_ZERO");
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
   * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
   */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a, "SafeMath#sub: UNDERFLOW");
    uint256 c = a - b;

    return c;
  }

  /**
   * @dev Adds two unsigned integers, reverts on overflow.
   */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "SafeMath#add: OVERFLOW");

    return c;
  }

  /**
   * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
   * reverts when dividing by zero.
   */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0, "SafeMath#mod: DIVISION_BY_ZERO");
    return a % b;
  }

}

// File: contracts\multi-token-standard\interfaces\IERC1155TokenReceiver.sol

pragma solidity ^0.5.12;

/**
 * @dev ERC-1155 interface for accepting safe transfers.
 */
interface IERC1155TokenReceiver {

  /**
   * @notice Handle the receipt of a single ERC1155 token type
   * @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated
   * This function MAY throw to revert and reject the transfer
   * Return of other amount than the magic value MUST result in the transaction being reverted
   * Note: The token contract address is always the message sender
   * @param _operator  The address which called the `safeTransferFrom` function
   * @param _from      The address which previously owned the token
   * @param _id        The id of the token being transferred
   * @param _amount    The amount of tokens being transferred
   * @param _data      Additional data with no specified format
   * @return           `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
   */
  function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _amount, bytes calldata _data) external returns(bytes4);

  /**
   * @notice Handle the receipt of multiple ERC1155 token types
   * @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated
   * This function MAY throw to revert and reject the transfer
   * Return of other amount than the magic value WILL result in the transaction being reverted
   * Note: The token contract address is always the message sender
   * @param _operator  The address which called the `safeBatchTransferFrom` function
   * @param _from      The address which previously owned the token
   * @param _ids       An array containing ids of each token being transferred
   * @param _amounts   An array containing amounts of each token being transferred
   * @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 _amounts, bytes calldata _data) external returns(bytes4);

  /**
   * @notice Indicates whether a contract implements the `ERC1155TokenReceiver` functions and so can accept ERC1155 token types.
   * @param  interfaceID The ERC-165 interface ID that is queried for support.s
   * @dev This function MUST return true if it implements the ERC1155TokenReceiver interface and ERC-165 interface.
   *      This function MUST NOT consume more than 5,000 gas.
   * @return Wheter ERC-165 or ERC1155TokenReceiver interfaces are supported.
   */
  function supportsInterface(bytes4 interfaceID) external view returns (bool);

}

// File: contracts\multi-token-standard\interfaces\IERC1155.sol

pragma solidity ^0.5.12;


interface IERC1155 {
  // Events

  /**
   * @dev Either TransferSingle or TransferBatch MUST emit when tokens are transferred, including zero amount transfers as well as minting or burning
   *   Operator MUST be msg.sender
   *   When minting/creating tokens, the `_from` field MUST be set to `0x0`
   *   When burning/destroying tokens, the `_to` field MUST be set to `0x0`
   *   The total amount transferred from address 0x0 minus the total amount transferred to 0x0 may be used by clients and exchanges to be added to the "circulating supply" for a given token ID
   *   To broadcast the existence of a token ID with no initial balance, the contract SHOULD emit the TransferSingle event from `0x0` to `0x0`, with the token 
creator as `_operator`, and a `_amount` of 0
   */
  event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _amount);

  /**
   * @dev Either TransferSingle or TransferBatch MUST emit when tokens are transferred, including zero amount transfers as well as minting or burning
   *   Operator MUST be msg.sender
   *   When minting/creating tokens, the `_from` field MUST be set to `0x0`
   *   When burning/destroying tokens, the `_to` field MUST be set to `0x0`
   *   The total amount transferred from address 0x0 minus the total amount transferred to 0x0 may be used by clients and exchanges to be added to the "circulating supply" for a given token ID
   *   To broadcast the existence of multiple token IDs with no initial balance, this SHOULD emit the TransferBatch event from `0x0` to `0x0`, with the token creator as `_operator`, and a `_amount` of 0
   */
  event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _amounts);

  /**
   * @dev MUST emit when an approval is updated
   */
  event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);

  /**
   * @dev MUST emit when the URI is updated for a token ID
   *   URIs are defined in RFC 3986
   *   The URI MUST point a JSON file that conforms to the "ERC-1155 Metadata JSON Schema"
   */
  event URI(string _amount, uint256 indexed _id);

  /**
   * @notice Transfers amount of an _id from the _from address to the _to address specified
   * @dev MUST emit TransferSingle event on success
   * Caller must be approved to manage the _from account's tokens (see isApprovedForAll)
   * MUST throw if `_to` is the zero address
   * MUST throw if balance of sender for token `_id` is lower than the `_amount` sent
   * MUST throw on any other error
   * When transfer is complete, this function MUST check if `_to` is a smart contract (code size > 0). If so, it MUST call `onERC1155Received` on `_to` and revert if the return amount is not `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
   * @param _from    Source address
   * @param _to      Target address
   * @param _id      ID of the token type
   * @param _amount  Transfered amount
   * @param _data    Additional data with no specified format, sent in call to `_to`
   */
  function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount, bytes calldata _data) external;

  /**
   * @notice Send multiple types of Tokens from the _from address to the _to address (with safety call)
   * @dev MUST emit TransferBatch event on success
   * Caller must be approved to manage the _from account's tokens (see isApprovedForAll)
   * MUST throw if `_to` is the zero address
   * MUST throw if length of `_ids` is not the same as length of `_amounts`
   * MUST throw if any of the balance of sender for token `_ids` is lower than the respective `_amounts` sent
   * MUST throw on any other error
   * When transfer is complete, this function MUST check if `_to` is a smart contract (code size > 0). If so, it MUST call `onERC1155BatchReceived` on `_to` and revert if the return amount is not `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
   * Transfers and events MUST occur in the array order they were submitted (_ids[0] before _ids[1], etc)
   * @param _from     Source addresses
   * @param _to       Target addresses
   * @param _ids      IDs of each token type
   * @param _amounts  Transfer amounts per token type
   * @param _data     Additional data with no specified format, sent in call to `_to`
  */
  function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _amounts, bytes calldata _data) external;

  /**
   * @notice Get the balance of an account's Tokens
   * @param _owner  The address of the token holder
   * @param _id     ID of the Token
   * @return        The _owner's balance of the Token type requested
   */
  function balanceOf(address _owner, uint256 _id) external view returns (uint256);

  /**
   * @notice Get the balance of multiple account/token pairs
   * @param _owners The addresses of the token holders
   * @param _ids    ID of the Tokens
   * @return        The _owner's balance of the Token types requested (i.e. balance for each (owner, id) pair)
   */
  function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory);

  /**
   * @notice Enable or disable approval for a third party ("operator") to manage all of caller's tokens
   * @dev MUST emit the ApprovalForAll event on success
   * @param _operator  Address to add to the set of authorized operators
   * @param _approved  True if the operator is approved, false to revoke approval
   */
  function setApprovalForAll(address _operator, bool _approved) external;

  /**
   * @notice Queries the approval status of an operator for a given owner
   * @param _owner     The owner of the Tokens
   * @param _operator  Address of authorized operator
   * @return           True if the operator is approved, false if not
   */
  function isApprovedForAll(address _owner, address _operator) external view returns (bool isOperator);

}

// File: contracts\multi-token-standard\utils\Address.sol

/**
 * Copyright 2018 ZeroEx Intl.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *   http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

pragma solidity ^0.5.12;


/**
 * Utility library of inline functions on addresses
 */
library Address {

  /**
   * Returns whether the target address is a contract
   * @dev This function will return false if invoked during the constructor of a contract,
   * as the code is not actually created until after the constructor finishes.
   * @param account address of the account to check
   * @return whether the target address is a contract
   */
  function isContract(address account) internal view returns (bool) {
    bytes32 codehash;
    bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;

    // XXX Currently there is no better way to check if there is a contract in an address
    // than to check the size of the code at that address.
    // See https://ethereum.stackexchange.com/a/14016/36603
    // for more details about how this works.
    // TODO Check this again before the Serenity release, because all addresses will be
    // contracts then.
    assembly { codehash := extcodehash(account) }
    return (codehash != 0x0 && codehash != accountHash);
  }

}

// File: contracts\multi-token-standard\tokens\ERC1155\ERC1155.sol

pragma solidity ^0.5.12;







/**
 * @dev Implementation of Multi-Token Standard contract
 */
contract ERC1155 is IERC165 {
  using SafeMath for uint256;
  using Address for address;


  /***********************************|
  |        Variables and Events       |
  |__________________________________*/

  // onReceive function signatures
  bytes4 constant internal ERC1155_RECEIVED_VALUE = 0xf23a6e61;
  bytes4 constant internal ERC1155_BATCH_RECEIVED_VALUE = 0xbc197c81;

  // Objects balances
  mapping (address => mapping(uint256 => uint256)) internal balances;

  // Operator Functions
  mapping (address => mapping(address => bool)) internal operators;

  // Events
  event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _amount);
  event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _amounts);
  event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);
  event URI(string _uri, uint256 indexed _id);


  /***********************************|
  |     Public Transfer Functions     |
  |__________________________________*/

  /**
   * @notice Transfers amount amount of an _id from the _from address to the _to address specified
   * @param _from    Source address
   * @param _to      Target address
   * @param _id      ID of the token type
   * @param _amount  Transfered amount
   * @param _data    Additional data with no specified format, sent in call to `_to`
   */
  function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount, bytes memory _data)
    public
  {
    require((msg.sender == _from) || isApprovedForAll(_from, msg.sender), "ERC1155#safeTransferFrom: INVALID_OPERATOR");
    require(_to != address(0),"ERC1155#safeTransferFrom: INVALID_RECIPIENT");
    // require(_amount >= balances[_from][_id]) is not necessary since checked with safemath operations

    _safeTransferFrom(_from, _to, _id, _amount);
    _callonERC1155Received(_from, _to, _id, _amount, _data);
  }

  /**
   * @notice Send multiple types of Tokens from the _from address to the _to address (with safety call)
   * @param _from     Source addresses
   * @param _to       Target addresses
   * @param _ids      IDs of each token type
   * @param _amounts  Transfer amounts per token type
   * @param _data     Additional data with no specified format, sent in call to `_to`
   */
  function safeBatchTransferFrom(address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data)
    public
  {
    // Requirements
    require((msg.sender == _from) || isApprovedForAll(_from, msg.sender), "ERC1155#safeBatchTransferFrom: INVALID_OPERATOR");
    require(_to != address(0), "ERC1155#safeBatchTransferFrom: INVALID_RECIPIENT");

    _safeBatchTransferFrom(_from, _to, _ids, _amounts);
    _callonERC1155BatchReceived(_from, _to, _ids, _amounts, _data);
  }


  /***********************************|
  |    Internal Transfer Functions    |
  |__________________________________*/

  /**
   * @notice Transfers amount amount of an _id from the _from address to the _to address specified
   * @param _from    Source address
   * @param _to      Target address
   * @param _id      ID of the token type
   * @param _amount  Transfered amount
   */
  function _safeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount)
    internal
  {
    // Update balances
    balances[_from][_id] = balances[_from][_id].sub(_amount); // Subtract amount
    balances[_to][_id] = balances[_to][_id].add(_amount);     // Add amount

    // Emit event
    emit TransferSingle(msg.sender, _from, _to, _id, _amount);
  }

  /**
   * @notice Verifies if receiver is contract and if so, calls (_to).onERC1155Received(...)
   */
  function _callonERC1155Received(address _from, address _to, uint256 _id, uint256 _amount, bytes memory _data)
    internal
  {
    // Check if recipient is contract
    if (_to.isContract() && _to != address(this)) {
      bytes4 retval = IERC1155TokenReceiver(_to).onERC1155Received(msg.sender, _from, _id, _amount, _data);
      require(retval == ERC1155_RECEIVED_VALUE, "ERC1155#_callonERC1155Received: INVALID_ON_RECEIVE_MESSAGE");
    }
  }

  /**
   * @notice Send multiple types of Tokens from the _from address to the _to address (with safety call)
   * @param _from     Source addresses
   * @param _to       Target addresses
   * @param _ids      IDs of each token type
   * @param _amounts  Transfer amounts per token type
   */
  function _safeBatchTransferFrom(address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts)
    internal
  {
    require(_ids.length == _amounts.length, "ERC1155#_safeBatchTransferFrom: INVALID_ARRAYS_LENGTH");

    // Number of transfer to execute
    uint256 nTransfer = _ids.length;

    // Executing all transfers
    for (uint256 i = 0; i < nTransfer; i++) {
      // Update storage balance of previous bin
      balances[_from][_ids[i]] = balances[_from][_ids[i]].sub(_amounts[i]);
      balances[_to][_ids[i]] = balances[_to][_ids[i]].add(_amounts[i]);
    }

    // Emit event
    emit TransferBatch(msg.sender, _from, _to, _ids, _amounts);
  }

  /**
   * @notice Verifies if receiver is contract and if so, calls (_to).onERC1155BatchReceived(...)
   */
  function _callonERC1155BatchReceived(address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data)
    internal
  {
    // Pass data if recipient is contract
    if (_to.isContract() && _to != address(this)) {
      bytes4 retval = IERC1155TokenReceiver(_to).onERC1155BatchReceived(msg.sender, _from, _ids, _amounts, _data);
      require(retval == ERC1155_BATCH_RECEIVED_VALUE, "ERC1155#_callonERC1155BatchReceived: INVALID_ON_RECEIVE_MESSAGE");
    }
  }


  /***********************************|
  |         Operator Functions        |
  |__________________________________*/

  /**
   * @notice Enable or disable approval for a third party ("operator") to manage all of caller's tokens
   * @param _operator  Address to add to the set of authorized operators
   * @param _approved  True if the operator is approved, false to revoke approval
   */
  function setApprovalForAll(address _operator, bool _approved)
    external
  {
    // Update operator status
    operators[msg.sender][_operator] = _approved;
    emit ApprovalForAll(msg.sender, _operator, _approved);
  }

  /**
   * @notice Queries the approval status of an operator for a given owner
   * @param _owner     The owner of the Tokens
   * @param _operator  Address of authorized operator
   * @return True if the operator is approved, false if not
   */
  function isApprovedForAll(address _owner, address _operator)
    public view returns (bool isOperator)
  {
    return operators[_owner][_operator];
  }


  /***********************************|
  |         Balance Functions         |
  |__________________________________*/

  /**
   * @notice Get the balance of an account's Tokens
   * @param _owner  The address of the token holder
   * @param _id     ID of the Token
   * @return The _owner's balance of the Token type requested
   */
  function balanceOf(address _owner, uint256 _id)
    public view returns (uint256)
  {
    return balances[_owner][_id];
  }

  /**
   * @notice Get the balance of multiple account/token pairs
   * @param _owners The addresses of the token holders
   * @param _ids    ID of the Tokens
   * @return        The _owner's balance of the Token types requested (i.e. balance for each (owner, id) pair)
   */
  function balanceOfBatch(address[] memory _owners, uint256[] memory _ids)
    public view returns (uint256[] memory)
  {
    require(_owners.length == _ids.length, "ERC1155#balanceOfBatch: INVALID_ARRAY_LENGTH");

    // Variables
    uint256[] memory batchBalances = new uint256[](_owners.length);

    // Iterate over each owner and token ID
    for (uint256 i = 0; i < _owners.length; i++) {
      batchBalances[i] = balances[_owners[i]][_ids[i]];
    }

    return batchBalances;
  }


  /***********************************|
  |          ERC165 Functions         |
  |__________________________________*/

  /**
   * INTERFACE_SIGNATURE_ERC165 = bytes4(keccak256("supportsInterface(bytes4)"));
   */
  bytes4 constant private INTERFACE_SIGNATURE_ERC165 = 0x01ffc9a7;

  /**
   * INTERFACE_SIGNATURE_ERC1155 =
   * bytes4(keccak256("safeTransferFrom(address,address,uint256,uint256,bytes)")) ^
   * bytes4(keccak256("safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)")) ^
   * bytes4(keccak256("balanceOf(address,uint256)")) ^
   * bytes4(keccak256("balanceOfBatch(address[],uint256[])")) ^
   * bytes4(keccak256("setApprovalForAll(address,bool)")) ^
   * bytes4(keccak256("isApprovedForAll(address,address)"));
   */
  bytes4 constant private INTERFACE_SIGNATURE_ERC1155 = 0xd9b67a26;

  /**
   * @notice Query if a contract implements an interface
   * @param _interfaceID  The interface identifier, as specified in ERC-165
   * @return `true` if the contract implements `_interfaceID` and
   */
  function supportsInterface(bytes4 _interfaceID) external view returns (bool) {
    if (_interfaceID == INTERFACE_SIGNATURE_ERC165 ||
        _interfaceID == INTERFACE_SIGNATURE_ERC1155) {
      return true;
    }
    return false;
  }

}

// File: contracts\multi-token-standard\tokens\ERC1155\ERC1155Metadata.sol

pragma solidity ^0.5.11;



/**
 * @notice Contract that handles metadata related methods.
 * @dev Methods assume a deterministic generation of URI based on token IDs.
 *      Methods also assume that URI uses hex representation of token IDs.
 */
contract ERC1155Metadata {

  // URI's default URI prefix
  string internal baseMetadataURI;
  event URI(string _uri, uint256 indexed _id);


  /***********************************|
  |     Metadata Public Function s    |
  |__________________________________*/

  /**
   * @notice A distinct Uniform Resource Identifier (URI) for a given token.
   * @dev URIs are defined in RFC 3986.
   *      URIs are assumed to be deterministically generated based on token ID
   *      Token IDs are assumed to be represented in their hex format in URIs
   * @return URI string
   */
  function uri(uint256 _id) public view returns (string memory) {
    return string(abi.encodePacked(baseMetadataURI, _uint2str(_id), ".json"));
  }


  /***********************************|
  |    Metadata Internal Functions    |
  |__________________________________*/

  /**
   * @notice Will emit default URI log event for corresponding token _id
   * @param _tokenIDs Array of IDs of tokens to log default URI
   */
  function _logURIs(uint256[] memory _tokenIDs) internal {
    string memory baseURL = baseMetadataURI;
    string memory tokenURI;

    for (uint256 i = 0; i < _tokenIDs.length; i++) {
      tokenURI = string(abi.encodePacked(baseURL, _uint2str(_tokenIDs[i]), ".json"));
      emit URI(tokenURI, _tokenIDs[i]);
    }
  }

  /**
   * @notice Will emit a specific URI log event for corresponding token
   * @param _tokenIDs IDs of the token corresponding to the _uris logged
   * @param _URIs    The URIs of the specified _tokenIDs
   */
  function _logURIs(uint256[] memory _tokenIDs, string[] memory _URIs) internal {
    require(_tokenIDs.length == _URIs.length, "ERC1155Metadata#_logURIs: INVALID_ARRAYS_LENGTH");
    for (uint256 i = 0; i < _tokenIDs.length; i++) {
      emit URI(_URIs[i], _tokenIDs[i]);
    }
  }

  /**
   * @notice Will update the base URL of token's URI
   * @param _newBaseMetadataURI New base URL of token's URI
   */
  function _setBaseMetadataURI(string memory _newBaseMetadataURI) internal {
    baseMetadataURI = _newBaseMetadataURI;
  }


  /***********************************|
  |    Utility Internal Functions     |
  |__________________________________*/

  /**
   * @notice Convert uint256 to string
   * @param _i Unsigned integer to convert to string
   */
  function _uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
    if (_i == 0) {
      return "0";
    }

    uint256 j = _i;
    uint256 ii = _i;
    uint256 len;

    // Get number of bytes
    while (j != 0) {
      len++;
      j /= 10;
    }

    bytes memory bstr = new bytes(len);
    uint256 k = len - 1;

    // Get each individual ASCII
    while (ii != 0) {
      bstr[k--] = byte(uint8(48 + ii % 10));
      ii /= 10;
    }

    // Convert to string
    return string(bstr);
  }

}

// File: contracts\multi-token-standard\tokens\ERC1155\ERC1155MintBurn.sol

pragma solidity ^0.5.12;



/**
 * @dev Multi-Fungible Tokens with minting and burning methods. These methods assume
 *      a parent contract to be executed as they are `internal` functions
 */
contract ERC1155MintBurn is ERC1155 {


  /****************************************|
  |            Minting Functions           |
  |_______________________________________*/

  /**
   * @notice Mint _amount of tokens of a given id
   * @param _to      The address to mint tokens to
   * @param _id      Token id to mint
   * @param _amount  The amount to be minted
   * @param _data    Data to pass if receiver is contract
   */
  function _mint(address _to, uint256 _id, uint256 _amount, bytes memory _data)
    internal
  {
    // Add _amount
    balances[_to][_id] = balances[_to][_id].add(_amount);

    // Emit event
    emit TransferSingle(msg.sender, address(0x0), _to, _id, _amount);

    // Calling onReceive method if recipient is contract
    _callonERC1155Received(address(0x0), _to, _id, _amount, _data);
  }

  /**
   * @notice Mint tokens for each ids in _ids
   * @param _to       The address to mint tokens to
   * @param _ids      Array of ids to mint
   * @param _amounts  Array of amount of tokens to mint per id
   * @param _data    Data to pass if receiver is contract
   */
  function _batchMint(address _to, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data)
    internal
  {
    require(_ids.length == _amounts.length, "ERC1155MintBurn#batchMint: INVALID_ARRAYS_LENGTH");

    // Number of mints to execute
    uint256 nMint = _ids.length;

     // Executing all minting
    for (uint256 i = 0; i < nMint; i++) {
      // Update storage balance
      balances[_to][_ids[i]] = balances[_to][_ids[i]].add(_amounts[i]);
    }

    // Emit batch mint event
    emit TransferBatch(msg.sender, address(0x0), _to, _ids, _amounts);

    // Calling onReceive method if recipient is contract
    _callonERC1155BatchReceived(address(0x0), _to, _ids, _amounts, _data);
  }


  /****************************************|
  |            Burning Functions           |
  |_______________________________________*/

  /**
   * @notice Burn _amount of tokens of a given token id
   * @param _from    The address to burn tokens from
   * @param _id      Token id to burn
   * @param _amount  The amount to be burned
   */
  function _burn(address _from, uint256 _id, uint256 _amount)
    internal
  {
    //Substract _amount
    balances[_from][_id] = balances[_from][_id].sub(_amount);

    // Emit event
    emit TransferSingle(msg.sender, _from, address(0x0), _id, _amount);
  }

  /**
   * @notice Burn tokens of given token id for each (_ids[i], _amounts[i]) pair
   * @param _from     The address to burn tokens from
   * @param _ids      Array of token ids to burn
   * @param _amounts  Array of the amount to be burned
   */
  function _batchBurn(address _from, uint256[] memory _ids, uint256[] memory _amounts)
    internal
  {
    require(_ids.length == _amounts.length, "ERC1155MintBurn#batchBurn: INVALID_ARRAYS_LENGTH");

    // Number of mints to execute
    uint256 nBurn = _ids.length;

     // Executing all minting
    for (uint256 i = 0; i < nBurn; i++) {
      // Update storage balance
      balances[_from][_ids[i]] = balances[_from][_ids[i]].sub(_amounts[i]);
    }

    // Emit batch mint event
    emit TransferBatch(msg.sender, _from, address(0x0), _ids, _amounts);
  }

}

// File: contracts\Strings.sol

pragma solidity ^0.5.11;

library Strings {
  // via https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.5.sol
  function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory) {
      bytes memory _ba = bytes(_a);
      bytes memory _bb = bytes(_b);
      bytes memory _bc = bytes(_c);
      bytes memory _bd = bytes(_d);
      bytes memory _be = bytes(_e);
      string memory abcde = new string(_ba.length + _bb.length + _bc.length + _bd.length + _be.length);
      bytes memory babcde = bytes(abcde);
      uint k = 0;
      for (uint i = 0; i < _ba.length; i++) babcde[k++] = _ba[i];
      for (uint i = 0; i < _bb.length; i++) babcde[k++] = _bb[i];
      for (uint i = 0; i < _bc.length; i++) babcde[k++] = _bc[i];
      for (uint i = 0; i < _bd.length; i++) babcde[k++] = _bd[i];
      for (uint i = 0; i < _be.length; i++) babcde[k++] = _be[i];
      return string(babcde);
    }

    function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) internal pure returns (string memory) {
        return strConcat(_a, _b, _c, _d, "");
    }

    function strConcat(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) {
        return strConcat(_a, _b, _c, "", "");
    }

    function strConcat(string memory _a, string memory _b) internal pure returns (string memory) {
        return strConcat(_a, _b, "", "", "");
    }

    function uint2str(uint _i) internal pure returns (string memory _uintAsString) {
        if (_i == 0) {
            return "0";
        }
        uint j = _i;
        uint len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint k = len - 1;
        while (_i != 0) {
            bstr[k--] = byte(uint8(48 + _i % 10));
            _i /= 10;
        }
        return string(bstr);
    }
}

// File: contracts\ERC1155Tradable.sol

pragma solidity ^0.5.12;






contract OwnableDelegateProxy { }

contract ProxyRegistry {
  mapping(address => OwnableDelegateProxy) public proxies;
}

interface ERC721 {
    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);
    function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;
    function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
    function approve(address _approved, uint256 _tokenId) external payable;
    function setApprovalForAll(address _operator, bool _approved) external;
    function getApproved(uint256 _tokenId) external view returns (address);
    function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}

/**
 * @title ERC1155Tradable
 * ERC1155Tradable - ERC1155 contract that whitelists an operator address, has create and mint functionality, and supports useful standards from OpenZeppelin, 
  like _exists(), name(), symbol(), and totalSupply()
 */
contract ERC1155Tradable is ERC1155, ERC1155MintBurn, ERC1155Metadata, Ownable {
  using Strings for string;

  event ArtCreated(uint token, uint amount, string name, address artist);

  uint256 printFee = 4000000000000000;
  address admin;
  address treasurer;
  bool lock = false;
  address oldContract = 0x677D8FE828Fd7143FF3CeE5883b7fC81e7c2de60;
  address proxyRegistryAddress;
  uint256 private _currentTokenID = 0;
  mapping (uint256 => address) public creators;
  mapping (uint256 => uint256) public tokenSupply;
  // Contract name
  string public name;
  // Contract symbol
  string public symbol;

  /**
   * @dev Require msg.sender to be the creator of the token id
   */
  modifier creatorOnly(uint256 _id) {
    require(creators[_id] == msg.sender, "ERC1155Tradable#creatorOnly: ONLY_CREATOR_ALLOWED");
    _;
  }

  /**
   * @dev Require msg.sender to own more than 0 of the token id
   */
  modifier ownersOnly(uint256 _id, uint256 _amount) {
    require(balances[msg.sender][_id] >= _amount, "ERC1155Tradable#ownersOnly: ONLY_OWNERS_ALLOWED");
    _;
  }

  /**
   * @dev Require msg.sender to be admin
   */
  modifier onlyAdmin() {
    require(msg.sender == admin, "ERC1155Tradable#ownersOnly: ONLY_ADMIN_ALLOWED");
    _;
  }

  constructor(
    string memory _name,
    string memory _symbol,
    address _proxyRegistryAddress
  ) public {
    name = _name;
    symbol = _symbol;
    admin = 0x486082148bc8Dc9DEe8c9E53649ea148291FF292;
    treasurer = 0xEbBFE1A7ffd8C0065eF1a87F018BaB8cf9aF1207;
    proxyRegistryAddress = _proxyRegistryAddress;
  }

  function uri(
    uint256 _id
  ) public view returns (string memory) {
    require(_exists(_id), "ERC721Tradable#uri: NONEXISTENT_TOKEN");
    return Strings.strConcat(
      baseMetadataURI,
      Strings.uint2str(_id)
    );
  }

  /**
    * @dev Returns the total quantity for a token ID
    * @param _id uint256 ID of the token to query
    * @return amount of token in existence
    */
  function totalSupply(
    uint256 _id
  ) public view returns (uint256) {
    return tokenSupply[_id];
  }

  /**
   * @dev Will update the base URL of token's URI
   * @param _newBaseMetadataURI New base URL of token's URI
   */
  function setBaseMetadataURI(
    string memory _newBaseMetadataURI
  ) public onlyAdmin {
    _setBaseMetadataURI(_newBaseMetadataURI);
  }

  /**
    * @dev Change the creator address for given tokens
    * @param _to   Address of the new creator
    * @param _ids  Array of Token IDs to change creator
    */
  function setCreator(
    address _to,
    uint256[] memory _ids
  ) public {
    require(_to != address(0), "ERC1155Tradable#setCreator: INVALID_ADDRESS.");
    for (uint256 i = 0; i < _ids.length; i++) {
      uint256 id = _ids[i];
      _setCreator(_to, id);
    }
  }

  /**
   * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-free listings.
   */
  function isApprovedForAll(
    address _owner,
    address _operator
  ) public view returns (bool isOperator) {
    // Whitelist OpenSea proxy contract for easy trading.
    ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress);
    if (address(proxyRegistry.proxies(_owner)) == _operator) {
      return true;
    }

    if (address(this) == _operator) {
      return true;
    }

    return ERC1155.isApprovedForAll(_owner, _operator);
  }

  /**
    * @dev Change the creator address for given token
    * @param _to   Address of the new creator
    * @param _id  Token IDs to change creator of
    */
  function _setCreator(address _to, uint256 _id) internal creatorOnly(_id)
  {
      creators[_id] = _to;
  }

  /**
    * @dev Returns whether the specified token exists by checking to see if it has a creator
    * @param _id uint256 ID of the token to query the existence of
    * @return bool whether the token exists
    */
  function _exists(
    uint256 _id
  ) internal view returns (bool) {
    return creators[_id] != address(0);
  }

  /**
    * @dev calculates the next token ID based on value of _currentTokenID
    * @return uint256 for the next token ID
    */
  function _getNextTokenID() private view returns (uint256) {
    return _currentTokenID.add(1);
  }

  /**
    * @dev increments the value of _currentTokenID
    */
  function _incrementTokenTypeId() private  {
    _currentTokenID++;
  }

  /**
    * @dev Creates a new token type and assigns _initialSupply to an address
    * NOTE: remove onlyOwner if you want third parties to create new tokens on your contract (which may change your IDs)
    * @param _initialSupply amount to supply the first owner
    * @param _name of artwork
    * @param _uri Optional URI for this token type
    * @param _data Data to pass if receiver is contract
    * @return The newly created token ID
    */
  function create(
    uint256 _initialSupply,
    string calldata _name,
    string calldata _uri,
    bytes calldata _data
  ) external payable returns (uint256) {
    require(_initialSupply > 0, "Cannot print 0 pieces!");
    require(msg.value >= printFee * _initialSupply, "Insufficient Balance");

    treasurer.call.value(msg.value)("");
    uint256 _id = _getNextTokenID();
    _incrementTokenTypeId();
    creators[_id] = msg.sender;

    if (bytes(_uri).length > 0) {
      emit URI(_uri, _id);
    }

    _mint(msg.sender, _id, _initialSupply, _data);

    tokenSupply[_id] = _initialSupply;
    emit ArtCreated(_id, _initialSupply, _name, msg.sender);
    return _id;
  }

  function toggleImports() public onlyAdmin{
    lock = !lock;
  }

  function importToken(uint256 _tokenIndex, string calldata _uri, bytes calldata _data) external{
    require(lock == false, "Imports Locked");
    ERC721(oldContract).transferFrom(msg.sender, address(0), _tokenIndex);
    uint256 _id = _getNextTokenID();
    _incrementTokenTypeId();
    creators[_id] = msg.sender;

    if (bytes(_uri).length > 0) {
      emit URI(_uri, _id);
    }
    _mint(msg.sender, _id, 1, _data);
    tokenSupply[_id] = 1;
    emit ArtCreated(_id, 1, "Imported Art", msg.sender);
  }

}

// File: contracts\BAE.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.5.12;

contract BAE is ERC1155Tradable {
    event AuctionStart(address creator, uint256 token, uint256 startingBid, uint256 auctionIndex, uint256 expiry);
    event AuctionEnd(uint256 token, uint256 finalBid, address owner, address newOwner, uint256 auctionIndex);
    event AuctionReset(uint256 auctionIndex, uint256 newExpiry, uint256 newPrice);
    event Bid(address bidder, uint256 token, uint256 auctionIndex, uint256 amount);

    uint256 public auctionCount;

    uint256 public auctionFee = 5; //Out of 1000 for 100%

    struct auctionData{
      address owner;
      address lastBidder;
      uint256 bid;
      uint256 expiry;
      uint256 token;
    }

    mapping(uint256 => auctionData) public auctionList;

    constructor(address _proxyRegistryAddress)
    ERC1155Tradable(
      "Blockchain Art Exchange",
      "BAE",
      _proxyRegistryAddress
    ) public {
      _setBaseMetadataURI("https://api.mybae.io/tokens/");
    }

    function changePrintFee(uint256 _newPrice) public onlyAdmin{
      printFee = _newPrice;
    }

    function setAuctionFee(uint256 _newFee) public onlyAdmin{
      require(_newFee < 1000, "Fee Too High!");
      auctionFee = _newFee;
    }

    function createAuction(uint256 _price, uint256 _expiry, uint256 _token, uint256 _amount) public ownersOnly(_token, _amount){
      require(block.timestamp < _expiry, "Auction Date Passed");
      require(block.timestamp + (86400 * 14) > _expiry, "Auction Date Too Far");
      require(_price > 0, "Auction Price Cannot Be 0");
      for(uint x = 0; x < _amount; x++){
        safeTransferFrom(msg.sender, address(this), _token, 1, "");
        auctionList[auctionCount] = auctionData(msg.sender, address(0), _price, _expiry, _token);
        emit AuctionStart(msg.sender, _token, _price, auctionCount, _expiry);
        auctionCount++;
      }
    }

    function bid(uint256 _index) public payable {
      require(auctionList[_index].expiry > block.timestamp);
      require(auctionList[_index].bid + 10000000000000000 <= msg.value);
      require(msg.sender != auctionList[_index].owner);
      require(msg.sender != auctionList[_index].lastBidder);
      if(auctionList[_index].lastBidder != address(0)){
        auctionList[_index].lastBidder.call.value(auctionList[_index].bid)("");
      }
      auctionList[_index].bid = msg.value;
      auctionList[_index].lastBidder = msg.sender;
      emit Bid(msg.sender, auctionList[_index].token, _index, msg.value);
    }

    function buy(uint256 _index) public payable {
      require(auctionList[_index].expiry < block.timestamp);
      require(auctionList[_index].bid <= msg.value);
      require(address(0) == auctionList[_index].lastBidder);
      require(auctionList[_index].bid > 0);
      this.safeTransferFrom(address(this), msg.sender, auctionList[_index].token, 1, "");
      uint256 fee = auctionList[_index].bid * auctionFee / 1000;
      treasurer.call.value(fee)("");
      auctionList[_index].owner.call.value(auctionList[_index].bid.sub(fee))("");
      emit AuctionEnd(auctionList[_index].token, auctionList[_index].bid, auctionList[_index].owner, msg.sender, _index);

      auctionList[_index].lastBidder = msg.sender;
      auctionList[_index].bid = 0;
    }

    function resetAuction(uint256 _index, uint256 _expiry, uint256 _price) public{
      require(msg.sender == auctionList[_index].owner, "You Dont Own This Auction!");
      require(address(0) == auctionList[_index].lastBidder, "Someone Won This Auction!");
      require(auctionList[_index].expiry < block.timestamp, "Auction Is Still Running");
      require(_expiry > block.timestamp, "Auction Date Passed");
      auctionList[_index].expiry = _expiry;
      auctionList[_index].bid = _price;
      emit AuctionReset(_index, _expiry, _price);
    }

    function concludeAuction(uint256 _index) public{
      require(auctionList[_index].expiry < block.timestamp, "Auction Not Expired");
      require(auctionList[_index].bid != 0, "Auction Concluded");
      if(auctionList[_index].lastBidder != address(0)){
        this.safeTransferFrom(address(this), auctionList[_index].lastBidder, auctionList[_index].token, 1, "");
        uint256 fee = auctionList[_index].bid * auctionFee / 1000;
        treasurer.call.value(fee)("");
        auctionList[_index].owner.call.value(auctionList[_index].bid.sub(fee))("");
        emit AuctionEnd(auctionList[_index].token, auctionList[_index].bid, auctionList[_index].owner, auctionList[_index].lastBidder, _index);
      }
      else{
        this.safeTransferFrom(address(this), auctionList[_index].owner, auctionList[_index].token, 1, "");
        emit AuctionEnd(auctionList[_index].token, 0, auctionList[_index].owner, auctionList[_index].owner, _index);
      }
      auctionList[_index].lastBidder = address(0);
      auctionList[_index].bid = 0;
    }


}

Read Contract

auctionCount 0x2ad71573 → uint256
auctionFee 0x14525b6b → uint256
auctionList 0x669c0083 → address, address, uint256, uint256, uint256
balanceOf 0x00fdd58e → uint256
balanceOfBatch 0x4e1273f4 → uint256[]
creators 0xcd53d08e → address
isApprovedForAll 0xe985e9c5 → bool
isOwner 0x8f32d59b → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenSupply 0x2693ebf2 → uint256
totalSupply 0xbd85b039 → uint256
uri 0x0e89341c → string

Write Contract 17 functions

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

bid 0x454a2ab3
uint256 _index
buy 0xd96a094a
uint256 _index
changePrintFee 0xa8c5ba81
uint256 _newPrice
concludeAuction 0xb8761301
uint256 _index
create 0x40ffae2e
uint256 _initialSupply
string _name
string _uri
bytes _data
returns: uint256
createAuction 0x431f21da
uint256 _price
uint256 _expiry
uint256 _token
uint256 _amount
importToken 0x4cd365cb
uint256 _tokenIndex
string _uri
bytes _data
renounceOwnership 0x715018a6
No parameters
resetAuction 0xf4d9fecc
uint256 _index
uint256 _expiry
uint256 _price
safeBatchTransferFrom 0x2eb2c2d6
address _from
address _to
uint256[] _ids
uint256[] _amounts
bytes _data
safeTransferFrom 0xf242432a
address _from
address _to
uint256 _id
uint256 _amount
bytes _data
setApprovalForAll 0xa22cb465
address _operator
bool _approved
setAuctionFee 0xf59e754c
uint256 _newFee
setBaseMetadataURI 0x7e518ec8
string _newBaseMetadataURI
setCreator 0xd2a6b51a
address _to
uint256[] _ids
toggleImports 0x97512905
No parameters
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

This address has 1 on-chain transactions, but only 1.4% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →