Address Contract Verified
Address
0x41F57e862c863721322D0DD0fe8EA8091a459439
Balance
0 ETH
Nonce
1
Code Size
12034 bytes
Creator
0x0a32494c...b099 at tx 0xd32d62e0...4728c1
Indexed Transactions
0
Contract Bytecode
12034 bytes
0x6080604052600436106102bb5760003560e01c8063715018a61161016e578063adfdeef9116100cb578063def60e911161007f578063e985e9c511610064578063e985e9c514610767578063f2fde38b14610787578063ffe630b5146107a757600080fd5b8063def60e9114610720578063e04985fc1461075457600080fd5b8063c81557e8116100b0578063c81557e8146106ca578063c87b56dd146106e0578063cd7c03261461070057600080fd5b8063adfdeef91461068a578063b88d4fde146106aa57600080fd5b806395d89b4111610122578063a22cb46511610107578063a22cb46514610635578063acf4561114610655578063add5a4fa1461066a57600080fd5b806395d89b411461060d578063a0712d681461062257600080fd5b80637e7641c3116101535780637e7641c3146105af5780638da5cb5b146105cf57806391b7f5ed146105ed57600080fd5b8063715018a61461057a5780637cb647591461058f57600080fd5b806334918dfd1161021c5780634f6ccce7116101d05780636352211e116101b55780636352211e1461052057806368428a1b1461054057806370a082311461055a57600080fd5b80634f6ccce7146104e057806355f804b31461050057600080fd5b80633ccfd60b116102015780633ccfd60b1461049557806342842e0e146104aa5780634c616db8146104ca57600080fd5b806334918dfd1461046a578063378f33be1461047f57600080fd5b806318160ddd1161027357806323b872dd1161025857806323b872dd146103f65780632f745c591461041657806332cb6b0c1461043657600080fd5b806318160ddd146103955780632126fcb2146103aa57600080fd5b8063081812fc116102a4578063081812fc14610317578063095ea7b31461034f578063132d3f6a1461037157600080fd5b806301ffc9a7146102c057806306fdde03146102f5575b600080fd5b3480156102cc57600080fd5b506102e06102db36600461284a565b6107c7565b60405190151581526020015b60405180910390f35b34801561030157600080fd5b5061030a61080b565b6040516102ec91906128bf565b34801561032357600080fd5b506103376103323660046128d2565b61089d565b6040516001600160a01b0390911681526020016102ec565b34801561035b57600080fd5b5061036f61036a366004612900565b61092a565b005b34801561037d57600080fd5b50610387600c5481565b6040519081526020016102ec565b3480156103a157600080fd5b50600354610387565b3480156103b657600080fd5b506103e16103c536600461292c565b600e602052600090815260409020805460019091015460ff1682565b604080519283529015156020830152016102ec565b34801561040257600080fd5b5061036f610411366004612949565b610a5c565b34801561042257600080fd5b50610387610431366004612900565b610ae3565b34801561044257600080fd5b506103877f000000000000000000000000000000000000000000000000000000000000271081565b34801561047657600080fd5b5061036f610c1e565b34801561048b57600080fd5b50610387600b5481565b3480156104a157600080fd5b5061036f610c8c565b3480156104b657600080fd5b5061036f6104c5366004612949565b610d84565b3480156104d657600080fd5b5061038760075481565b3480156104ec57600080fd5b506103876104fb3660046128d2565b610d9f565b34801561050c57600080fd5b5061036f61051b366004612a29565b610e1d565b34801561052c57600080fd5b5061033761053b3660046128d2565b610e83565b34801561054c57600080fd5b506008546102e09060ff1681565b34801561056657600080fd5b5061038761057536600461292c565b610f23565b34801561058657600080fd5b5061036f61100e565b34801561059b57600080fd5b5061036f6105aa3660046128d2565b611074565b3480156105bb57600080fd5b506102e06105ca366004612b12565b6110d3565b3480156105db57600080fd5b506006546001600160a01b0316610337565b3480156105f957600080fd5b5061036f6106083660046128d2565b611111565b34801561061957600080fd5b5061030a611170565b61036f6106303660046128d2565b61117f565b34801561064157600080fd5b5061036f610650366004612b76565b61143c565b34801561066157600080fd5b5061030a611447565b34801561067657600080fd5b5061036f610685366004612900565b6114d5565b34801561069657600080fd5b5061036f6106a536600461292c565b61160f565b3480156106b657600080fd5b5061036f6106c5366004612bb4565b61168b565b3480156106d657600080fd5b5061038760095481565b3480156106ec57600080fd5b5061030a6106fb3660046128d2565b611713565b34801561070c57600080fd5b50600d54610337906001600160a01b031681565b34801561072c57600080fd5b506103877f000000000000000000000000000000000000000000000000000000000000006481565b61036f610762366004612c20565b6117eb565b34801561077357600080fd5b506102e0610782366004612c8e565b611b3a565b34801561079357600080fd5b5061036f6107a236600461292c565b611c3a565b3480156107b357600080fd5b5061036f6107c2366004612a29565b611d19565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610805575061080582611d86565b92915050565b60606000805461081a90612cbc565b80601f016020809104026020016040519081016040528092919081815260200182805461084690612cbc565b80156108935780601f1061086857610100808354040283529160200191610893565b820191906000526020600020905b81548152906001019060200180831161087657829003601f168201915b5050505050905090565b60006108a882611e21565b61090e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061093582610e83565b9050806001600160a01b0316836001600160a01b031614156109bf5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610905565b336001600160a01b03821614806109db57506109db8133611b3a565b610a4d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610905565b610a578383611e6b565b505050565b610a663382611ed9565b610ad85760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610905565b610a57838383611f9b565b6000610aee83610f23565b8210610b505760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610905565b6000805b600354811015610bc15760038181548110610b7157610b71612cf7565b6000918252602090912001546001600160a01b0386811691161415610baf5783821415610ba15791506108059050565b81610bab81612d23565b9250505b80610bb981612d23565b915050610b54565b5060405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610905565b6006546001600160a01b03163314610c785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610905565b6008805460ff19811660ff90911615179055565b6006546001600160a01b03163314610ce65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610905565b6040514790600090339083908381818185875af1925050503d8060008114610d2a576040519150601f19603f3d011682016040523d82523d6000602084013e610d2f565b606091505b5050905080610d805760405162461bcd60e51b815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610905565b5050565b610a578383836040518060200160405280600081525061168b565b6003546000908210610e195760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610905565b5090565b6006546001600160a01b03163314610e775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610905565b610e808161211e565b50565b60008060038381548110610e9957610e99612cf7565b6000918252602090912001546001600160a01b03169050806108055760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610905565b60006001600160a01b038216610fa15760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610905565b6000805b60035481101561100757836001600160a01b031660038281548110610fcc57610fcc612cf7565b6000918252602090912001546001600160a01b03161415610ff55781610ff181612d23565b9250505b80610fff81612d23565b915050610fa5565b5092915050565b6006546001600160a01b031633146110685760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610905565b6110726000612131565b565b6006546001600160a01b031633146110ce5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610905565b600c55565b600061110a83600c5433856040516020016110ef929190612d3e565b60405160208183030381529060405280519060200120612183565b9392505050565b6006546001600160a01b0316331461116b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610905565b600755565b60606001805461081a90612cbc565b600654600160a01b900460ff16156111d95760405162461bcd60e51b815260206004820181905260248201527f63616e6e6f74207265656e7465722061206c6f636b65642066756e6374696f6e6044820152606401610905565b6006805460ff60a01b1916600160a01b17905560085460ff1661123e5760405162461bcd60e51b815260206004820152601960248201527f7075626c69632073616c65206973206e6f7420616374697665000000000000006044820152606401610905565b33321461128d5760405162461bcd60e51b815260206004820152601d60248201527f6e6f2070726f7879207472616e73616374696f6e7320616c6c6f7765640000006044820152606401610905565b600061129860035490565b905060095460016112a99190612d76565b821061131c5760405162461bcd60e51b8152602060048201526024808201527f6d6178206d696e7420616d6f756e74207065722073657373696f6e206578636560448201527f65646564000000000000000000000000000000000000000000000000000000006064820152608401610905565b6113477f00000000000000000000000000000000000000000000000000000000000027106001612d76565b6113518383612d76565b1061139e5760405162461bcd60e51b815260206004820152601660248201527f6d6178204e4654206c696d6974206578636565646564000000000000000000006044820152606401610905565b6007546113ab9083612d8e565b3410156113fa5760405162461bcd60e51b815260206004820152601360248201527f6e6f7420656e6f756768204554482073656e74000000000000000000000000006044820152606401610905565b60005b8281101561142a57611418336114138385612d76565b612199565b8061142281612d23565b9150506113fd565b50506006805460ff60a01b1916905550565b610d803383836121b3565b600a805461145490612cbc565b80601f016020809104026020016040519081016040528092919081815260200182805461148090612cbc565b80156114cd5780601f106114a2576101008083540402835291602001916114cd565b820191906000526020600020905b8154815290600101906020018083116114b057829003601f168201915b505050505081565b6006546001600160a01b0316331461152f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610905565b60008111801561157457506115657f00000000000000000000000000000000000000000000000000000000000000646001612d76565b600b546115729083612d76565b105b6115c05760405162461bcd60e51b815260206004820181905260248201527f4e6f7420656e6f7567682072657365727665206c65667420666f72207465616d6044820152606401610905565b60006115cb60035490565b905081600b546115db9190612d76565b600b5560005b82811015611609576115f7846114138385612d76565b8061160181612d23565b9150506115e1565b50505050565b6006546001600160a01b031633146116695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610905565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6116953383611ed9565b6117075760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610905565b61160984848484612282565b606061171e82611e21565b6117905760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610905565b600061179a612300565b905060008151116117ba576040518060200160405280600081525061110a565b806117c48461230f565b6040516020016117d5929190612dad565b6040516020818303038152906040529392505050565b600654600160a01b900460ff16156118455760405162461bcd60e51b815260206004820181905260248201527f63616e6e6f74207265656e7465722061206c6f636b65642066756e6374696f6e6044820152606401610905565b6006805460ff60a01b1916600160a01b179055600c546118a75760405162461bcd60e51b815260206004820152601960248201527f636c61696d20706572696f64206e6f74207374617274656421000000000000006044820152606401610905565b60006118b260035490565b90506118df7f00000000000000000000000000000000000000000000000000000000000027106001612d76565b6118e98383612d76565b106119365760405162461bcd60e51b815260206004820152601d60248201527f6d617820636f6c6c656374696f6e206c696d69742065786365656465640000006044820152606401610905565b600c546040516bffffffffffffffffffffffff193360601b1660208201527fff000000000000000000000000000000000000000000000000000000000000008516603482015261198a9186916035016110ef565b6119fc5760405162461bcd60e51b815260206004820152602760248201527f756e617574686f72697a65642070726f6f662d6b657920636f6d626f20666f7260448201527f2073656e646572000000000000000000000000000000000000000000000000006064820152608401610905565b611a0b60f884901c6001612ddc565b336000908152600e602052604090205460ff9190911690611a2d908490612d76565b10611a7a5760405162461bcd60e51b815260206004820152601c60248201527f6d61782066726565204e465420636c61696d73206578636565646564000000006044820152606401610905565b600754611a879083612d8e565b341015611ad65760405162461bcd60e51b815260206004820152601360248201527f6e6f7420656e6f756768204554482073656e74000000000000000000000000006044820152606401610905565b336000908152600e602052604081208054849290611af5908490612d76565b90915550600090505b82811015611b2657611b14336114138385612d76565b80611b1e81612d23565b915050611afe565b50506006805460ff60a01b19169055505050565b600d546040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260009281169190841690829063c455279190602401602060405180830381865afa158015611ba5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc99190612e01565b6001600160a01b03161480611bf957506001600160a01b0383166000908152600e602052604090206001015460ff165b15611c08576001915050610805565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b6006546001600160a01b03163314611c945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610905565b6001600160a01b038116611d105760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610905565b610e8081612131565b6006546001600160a01b03163314611d735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610905565b8051610d8090600a9060208401906127a4565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480611de957506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061080557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610805565b60035460009082108015610805575060006001600160a01b031660038381548110611e4e57611e4e612cf7565b6000918252602090912001546001600160a01b0316141592915050565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ea082610e83565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611ee482611e21565b611f455760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610905565b6000611f5083610e83565b9050806001600160a01b0316846001600160a01b03161480611f8b5750836001600160a01b0316611f808461089d565b6001600160a01b0316145b80611c325750611c328185611b3a565b826001600160a01b0316611fae82610e83565b6001600160a01b03161461202a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610905565b6001600160a01b0382166120a55760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610905565b6120b0600082611e6b565b81600382815481106120c4576120c4612cf7565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b8051610d809060029060208401906127a4565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000826121908584612441565b14949350505050565b610d808282604051806020016040528060008152506124b5565b816001600160a01b0316836001600160a01b031614156122155760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610905565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61228d848484611f9b565b61229984848484612533565b6116095760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610905565b60606002805461081a90612cbc565b60608161234f57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612379578061236381612d23565b91506123729050600a83612e34565b9150612353565b60008167ffffffffffffffff8111156123945761239461298a565b6040519080825280601f01601f1916602001820160405280156123be576020820181803683370190505b5090505b8415611c32576123d3600183612e48565b91506123e0600a86612e5f565b6123eb906030612d76565b60f81b81838151811061240057612400612cf7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061243a600a86612e34565b94506123c2565b600081815b84518110156124ad57600085828151811061246357612463612cf7565b60200260200101519050808311612489576000838152602082905260409020925061249a565b600081815260208490526040902092505b50806124a581612d23565b915050612446565b509392505050565b6124bf838361267c565b6124cc6000848484612533565b610a575760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610905565b60006001600160a01b0384163b1561267157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612577903390899088908890600401612e73565b6020604051808303816000875af19250505080156125b2575060408051601f3d908101601f191682019092526125af91810190612eaf565b60015b612657573d8080156125e0576040519150601f19603f3d011682016040523d82523d6000602084013e6125e5565b606091505b50805161264f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610905565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c32565b506001949350505050565b6001600160a01b0382166126d25760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610905565b6126db81611e21565b156127285760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610905565b6003805460018101825560009182527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546127b090612cbc565b90600052602060002090601f0160209004810192826127d25760008555612818565b82601f106127eb57805160ff1916838001178555612818565b82800160010185558215612818579182015b828111156128185782518255916020019190600101906127fd565b50610e199291505b80821115610e195760008155600101612820565b6001600160e01b031981168114610e8057600080fd5b60006020828403121561285c57600080fd5b813561110a81612834565b60005b8381101561288257818101518382015260200161286a565b838111156116095750506000910152565b600081518084526128ab816020860160208601612867565b601f01601f19169290920160200192915050565b60208152600061110a6020830184612893565b6000602082840312156128e457600080fd5b5035919050565b6001600160a01b0381168114610e8057600080fd5b6000806040838503121561291357600080fd5b823561291e816128eb565b946020939093013593505050565b60006020828403121561293e57600080fd5b813561110a816128eb565b60008060006060848603121561295e57600080fd5b8335612969816128eb565b92506020840135612979816128eb565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156129c9576129c961298a565b604052919050565b600067ffffffffffffffff8311156129eb576129eb61298a565b6129fe601f8401601f19166020016129a0565b9050828152838383011115612a1257600080fd5b828260208301376000602084830101529392505050565b600060208284031215612a3b57600080fd5b813567ffffffffffffffff811115612a5257600080fd5b8201601f81018413612a6357600080fd5b611c32848235602084016129d1565b600082601f830112612a8357600080fd5b8135602067ffffffffffffffff821115612a9f57612a9f61298a565b8160051b612aae8282016129a0565b9283528481018201928281019087851115612ac857600080fd5b83870192505b84831015612ae757823582529183019190830190612ace565b979650505050505050565b600082601f830112612b0357600080fd5b61110a838335602085016129d1565b60008060408385031215612b2557600080fd5b823567ffffffffffffffff80821115612b3d57600080fd5b612b4986838701612a72565b93506020850135915080821115612b5f57600080fd5b50612b6c85828601612af2565b9150509250929050565b60008060408385031215612b8957600080fd5b8235612b94816128eb565b915060208301358015158114612ba957600080fd5b809150509250929050565b60008060008060808587031215612bca57600080fd5b8435612bd5816128eb565b93506020850135612be5816128eb565b925060408501359150606085013567ffffffffffffffff811115612c0857600080fd5b612c1487828801612af2565b91505092959194509250565b600080600060608486031215612c3557600080fd5b833567ffffffffffffffff811115612c4c57600080fd5b612c5886828701612a72565b93505060208401357fff000000000000000000000000000000000000000000000000000000000000008116811461297957600080fd5b60008060408385031215612ca157600080fd5b8235612cac816128eb565b91506020830135612ba9816128eb565b600181811c90821680612cd057607f821691505b60208210811415612cf157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612d3757612d37612d0d565b5060010190565b6bffffffffffffffffffffffff198360601b16815260008251612d68816014850160208701612867565b919091016014019392505050565b60008219821115612d8957612d89612d0d565b500190565b6000816000190483118215151615612da857612da8612d0d565b500290565b60008351612dbf818460208801612867565b835190830190612dd3818360208801612867565b01949350505050565b600060ff821660ff84168060ff03821115612df957612df9612d0d565b019392505050565b600060208284031215612e1357600080fd5b815161110a816128eb565b634e487b7160e01b600052601260045260246000fd5b600082612e4357612e43612e1e565b500490565b600082821015612e5a57612e5a612d0d565b500390565b600082612e6e57612e6e612e1e565b500690565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612ea56080830184612893565b9695505050505050565b600060208284031215612ec157600080fd5b815161110a8161283456fea264697066735822122083b13de828e06ed2b6d1ccebaee9d22725e83de8ac59669c1406b67708b33dd964736f6c634300080a0033
Verified Source Code Full Match
Compiler: v0.8.10+commit.fc410830
EVM: london
Optimization: Yes (1000 runs)
ethalienVOX.sol 149 lines
// SPDX-License-Identifier: MIT
//
// Ethalien VOX
/*
* _.--'""'--._
* / _ _ \
* / / o\ / o\ \
* \ \___\ /___/ /
* \__ __/
* \ '' /
* \\__//
* '..'
*
*
* @Danny_One
*
*/
import "./ERC721_efficient.sol";
pragma solidity ^0.8.0;
contract EthalienVOX is ERC721Enumerable, Ownable, nonReentrant {
uint256 public vxPrice = 55000000000000000; // 0.055 ETH
uint256 public immutable MAX_SUPPLY = 10000; // 10k supply
uint256 public immutable MAX_TEAMRESERVE = 100; // total team reserves allowed
bool public saleActive = false;
uint256 public maxSaleMint = 10;
string public VOXprovenance;
uint256 public teamMints = 0;
bytes32 public MerkleRoot;
address public proxyRegistryAddress;
struct AddressInfo {
uint256 ownerPresaleMints;
bool projectProxy;
}
mapping(address => AddressInfo) public addressInfo;
constructor() ERC721("Ethalien VOX", "VALIEN") {}
// PUBLIC FUNCTIONS
function mint(uint256 _mintAmount) public payable reentryLock {
require(saleActive, "public sale is not active");
require(msg.sender == tx.origin, "no proxy transactions allowed");
uint256 supply = totalSupply();
require(_mintAmount < maxSaleMint + 1, "max mint amount per session exceeded");
require(supply + _mintAmount < MAX_SUPPLY + 1, "max NFT limit exceeded");
require(msg.value >= _mintAmount * vxPrice, "not enough ETH sent");
for (uint256 i=0; i < _mintAmount; i++) {
_safeMint(msg.sender, supply + i);
}
}
function mintPresale(bytes32[] memory _proof, bytes1 _maxAmountKey, uint256 _mintAmount) public payable reentryLock {
require(MerkleRoot > 0x00, "claim period not started!");
uint256 supply = totalSupply();
require(supply + _mintAmount < MAX_SUPPLY + 1, "max collection limit exceeded");
require(MerkleProof.verify(_proof, MerkleRoot, keccak256(abi.encodePacked(msg.sender, _maxAmountKey))), "unauthorized proof-key combo for sender");
require(addressInfo[msg.sender].ownerPresaleMints + _mintAmount < uint8(_maxAmountKey) + 1, "max free NFT claims exceeded");
require(msg.value >= _mintAmount * vxPrice, "not enough ETH sent");
addressInfo[msg.sender].ownerPresaleMints += _mintAmount;
for (uint256 i=0; i < _mintAmount; i++) {
_safeMint(msg.sender, supply + i);
}
}
function checkProofWithKey(bytes32[] memory proof, bytes memory key) public view returns(bool) {
return MerkleProof.verify(proof, MerkleRoot, keccak256(abi.encodePacked(msg.sender, key)));
}
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
MarketplaceProxyRegistry proxyRegistry = MarketplaceProxyRegistry(proxyRegistryAddress);
if (address(proxyRegistry.proxies(_owner)) == operator || addressInfo[operator].projectProxy) return true;
return super.isApprovedForAll(_owner, operator);
}
// ONLY OWNER FUNCTIONS
function setBaseURI(string memory baseURI_) public onlyOwner {
_setBaseURI(baseURI_);
}
function setMerkleRoot(bytes32 _MerkleRoot) public onlyOwner {
MerkleRoot = _MerkleRoot;
}
function flipSaleState() public onlyOwner {
saleActive = !saleActive;
}
function setProxyRegistry(address _proxyRegistryAddress) public onlyOwner {
proxyRegistryAddress = _proxyRegistryAddress;
}
function withdraw() public onlyOwner {
uint256 balance = address(this).balance;
(bool success, ) = msg.sender.call{value: balance}("");
require(success, "Transfer failed.");
}
function setPrice(uint256 _newPrice) public onlyOwner {
vxPrice = _newPrice;
}
function setProvenance(string memory _provenance) public onlyOwner {
VOXprovenance = _provenance;
}
// reserve function for team mints (giveaways & payments)
function teamMint(address _to, uint256 _reserveAmount) public onlyOwner {
require(_reserveAmount > 0 && _reserveAmount + teamMints < MAX_TEAMRESERVE + 1, "Not enough reserve left for team");
uint256 supply = totalSupply();
teamMints = teamMints + _reserveAmount;
for (uint i = 0; i < _reserveAmount; i++) {
_safeMint(_to, supply + i );
}
}
}
contract OwnableDelegateProxy { }
contract MarketplaceProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
ERC721_efficient.sol 1337 lines
/**
* Flattened contract dependencies for ERC721 NFT projects
* @Danny_One
*
*
* Added Merkle Proof presale list
* Improved Enumerable per new best practices to save gas
*
* Flattened from:
* MerkleProof.sol - Nuclear Nerds (2022-01-16)
* ERC721Enumerable.sol - Nuclear Nerds (2022-01-04)
* IERC721Enumerable.sol - Open Zeppelin (2022-01-04)
* OpenZeppelin (on 2021-11-18):
* ERC721.sol
* IERC721.sol
* IERC721Receiver.sol
* IERC721Metadata.sol
* Address.sol
* Context.sol
* Ownable.sol
* Strings.sol
* Counters.sol
* ERC165.sol
* IERC165.sol
* nonReentrant (custom)
*
**/
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = _efficientHash(computedHash, proofElement);
} else {
// Hash(current element of the proof + current computed hash)
computedHash = _efficientHash(proofElement, computedHash);
}
}
return computedHash;
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
// OpenZeppelin Contracts v4.3.2 (utils/introspection/IERC165.sol)
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
// OpenZeppelin Contracts v4.3.2 (utils/introspection/ERC165.sol)
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
// OpenZeppelin Contracts v4.3.2 (utils/Strings.sol)
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
// OpenZeppelin Contracts v4.3.2 (utils/Context.sol)
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
// OpenZeppelin Contracts v4.3.2 (access/Ownable.sol)
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// OpenZeppelin Contracts v4.3.2 (utils/Address.sol)
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// OpenZeppelin Contracts v4.3.2 (token/ERC721/IERC721.sol)
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
// OpenZeppelin Contracts v4.3.2 (token/ERC721/extensions/IERC721Metadata.sol)
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
// OpenZeppelin Contracts v4.3.2 (token/ERC721/IERC721Receiver.sol)
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
// OpenZeppelin Contracts v4.3.2 (utils/Counters.sol)
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
/**
* @title nonReentrant module to prevent recursive calling of functions
* @dev See https://medium.com/coinmonks/protect-your-solidity-smart-contracts-from-reentrancy-attacks-9972c3af7c21
* part of a flattened ERC721 dependency collection compiled by Danny_One
*/
abstract contract nonReentrant {
bool private _reentryKey = false;
modifier reentryLock {
require(!_reentryKey, "cannot reenter a locked function");
_reentryKey = true;
_;
_reentryKey = false;
}
}
// OpenZeppelin Contracts v4.3.2 (token/ERC721/ERC721.sol)
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
* Modified from original OpenZeppelin version to improve gas performance
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Base URI
string private _baseURI;
// Owner array
address[] internal _owners;
// Removed for optimization
// Mapping from token ID to owner address
// mapping(uint256 => address) private _owners;
// Mapping owner address to token count
// mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
* updated for owner array
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
uint256 _ownerBalance = 0;
for(uint i = 0; i < _owners.length; i++) {
if(_owners[i] == owner) _ownerBalance ++;
}
return _ownerBalance;
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI_ = baseURI();
return bytes(baseURI_).length > 0 ? string(abi.encodePacked(baseURI_, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function baseURI() internal view virtual returns (string memory) {
return _baseURI;
}
/**
* @dev Internal function to set the base URI for all token IDs. It is
* automatically added as a prefix to the value returned in {tokenURI},
* or to the token ID if {tokenURI} is empty.
*/
function _setBaseURI(string memory baseURI_) internal virtual {
_baseURI = baseURI_;
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return tokenId < _owners.length && _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_owners.push(to);
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_owners[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol)
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}
/**
* borrowed from Nuclear Nerds implementation
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account but rips out the core of the gas-wasting processing that comes from OpenZeppelin.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _owners.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < _owners.length, "ERC721Enumerable: global index out of bounds");
return index;
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256 tokenId) {
require(index < balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
uint count;
for(uint i; i < _owners.length; i++){
if(owner == _owners[i]){
if(count == index) return i;
else count++;
}
}
revert("ERC721Enumerable: owner index out of bounds");
}
}
Read Contract
MAX_SUPPLY 0x32cb6b0c → uint256
MAX_TEAMRESERVE 0xdef60e91 → uint256
MerkleRoot 0x132d3f6a → bytes32
VOXprovenance 0xacf45611 → string
addressInfo 0x2126fcb2 → uint256, bool
balanceOf 0x70a08231 → uint256
checkProofWithKey 0x7e7641c3 → bool
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
maxSaleMint 0xc81557e8 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
proxyRegistryAddress 0xcd7c0326 → address
saleActive 0x68428a1b → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
teamMints 0x378f33be → uint256
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
vxPrice 0x4c616db8 → uint256
Write Contract 17 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
flipSaleState 0x34918dfd
No parameters
mint 0xa0712d68
uint256 _mintAmount
mintPresale 0xe04985fc
bytes32[] _proof
bytes1 _maxAmountKey
uint256 _mintAmount
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x55f804b3
string baseURI_
setMerkleRoot 0x7cb64759
bytes32 _MerkleRoot
setPrice 0x91b7f5ed
uint256 _newPrice
setProvenance 0xffe630b5
string _provenance
setProxyRegistry 0xadfdeef9
address _proxyRegistryAddress
teamMint 0xadd5a4fa
address _to
uint256 _reserveAmount
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters
Recent Transactions
No transactions found for this address