Address Contract Partially Verified
Address
0xc8D2bf842b9f0b601043fb4fd5F23d22b9483911
Balance
0 ETH
Nonce
1
Code Size
15503 bytes
Creator
0xf3779e6d...d9fF at tx 0x385f98af...089252
Indexed Transactions
0
Contract Bytecode
15503 bytes
0x60806040526004361061038c5760003560e01c80637bc36e04116101dc578063a532409311610102578063c0e24d5e116100a0578063e757c17d1161006f578063e757c17d14610a27578063e985e9c514610a3d578063f2fde38b14610a86578063f560d41514610aa657600080fd5b8063c0e24d5e146109c9578063c634d032146109de578063c87b56dd146109f1578063d5abeb0114610a1157600080fd5b8063b88d4fde116100dc578063b88d4fde14610960578063b988477214610980578063bc3415a214610993578063bce93fcb146109a957600080fd5b8063a5324093146108f3578063a56f5b1914610920578063b0490f611461094057600080fd5b80638da5cb5b1161017a5780639abc8320116101495780639abc8320146108925780639b6860c8146108a75780639ed36d67146108bd578063a22cb465146108d357600080fd5b80638da5cb5b1461081f5780638f10d94d1461083d578063938e3d7b1461085d57806395d89b411461087d57600080fd5b80637d7eee42116101b65780637d7eee421461079f5780637f4c8ca2146107bf578063820de0c5146107df57806382910481146107ff57600080fd5b80637bc36e041461073f5780637bddc97c1461075f5780637c928fe91461077f57600080fd5b806342842e0e116102c15780635e50689d1161025f57806370a082311161022e57806370a08231146106d4578063715018a6146106f4578063736e901014610709578063791a25191461071f57600080fd5b80635e50689d146106555780636352211e146106755780636dd478e3146106955780636ed09aae146106a857600080fd5b80634c2612471161029b5780634c261247146105db5780634f6ccce7146105fb57806354214f691461061b57806355f804b31461063557600080fd5b806342842e0e1461055b57806342f566301461057b5780634334b479146105ab57600080fd5b8063130789481161032e57806323b872dd1161030857806323b872dd146104e65780632f745c59146105065780633ccfd60b14610526578063408cbf941461053b57600080fd5b8063130789481461049b57806318160ddd146104b157806321b86dd0146104c657600080fd5b806306fdde031161036a57806306fdde031461040a578063075c79231461041f578063081812fc14610443578063095ea7b31461047b57600080fd5b80630157ad2d1461039157806301ffc9a7146103b357806306c536ab146103e8575b600080fd5b34801561039d57600080fd5b506103b16103ac366004613552565b610abc565b005b3480156103bf57600080fd5b506103d36103ce366004613599565b610b20565b60405190151581526020015b60405180910390f35b3480156103f457600080fd5b506103fd610b7c565b6040516103df919061360e565b34801561041657600080fd5b506103fd610c0a565b34801561042b57600080fd5b5061043560125481565b6040519081526020016103df565b34801561044f57600080fd5b5061046361045e366004613552565b610c9c565b6040516001600160a01b0390911681526020016103df565b34801561048757600080fd5b506103b1610496366004613638565b610d42565b3480156104a757600080fd5b5061043560135481565b3480156104bd57600080fd5b50600854610435565b3480156104d257600080fd5b506103b16104e1366004613662565b610e74565b3480156104f257600080fd5b506103b161050136600461367d565b610ef2565b34801561051257600080fd5b50610435610521366004613638565b610f79565b34801561053257600080fd5b506103b1611021565b34801561054757600080fd5b506103b1610556366004613638565b6110ae565b34801561056757600080fd5b506103b161057636600461367d565b611177565b34801561058757600080fd5b506103d3610596366004613662565b601a6020526000908152604090205460ff1681565b3480156105b757600080fd5b506103d36105c6366004613662565b60186020526000908152604090205460ff1681565b3480156105e757600080fd5b506103b16105f6366004613758565b611192565b34801561060757600080fd5b50610435610616366004613552565b61125a565b34801561062757600080fd5b506017546103d39060ff1681565b34801561064157600080fd5b506103b1610650366004613758565b6112fe565b34801561066157600080fd5b506103b1610670366004613552565b61136b565b34801561068157600080fd5b50610463610690366004613552565b6113ca565b6103b16106a3366004613552565b611455565b3480156106b457600080fd5b506017546106c790610100900460ff1681565b6040516103df91906137b7565b3480156106e057600080fd5b506104356106ef366004613662565b611764565b34801561070057600080fd5b506103b16117fe565b34801561071557600080fd5b5061043560105481565b34801561072b57600080fd5b506103b161073a366004613552565b611864565b34801561074b57600080fd5b506103b161075a366004613552565b6118c3565b34801561076b57600080fd5b506103b161077a3660046137df565b611922565b34801561078b57600080fd5b506103b161079a366004613552565b6119c2565b3480156107ab57600080fd5b506103b16107ba366004613552565b611ba5565b3480156107cb57600080fd5b506103b16107da366004613896565b611c04565b3480156107eb57600080fd5b506103b16107fa366004613758565b611d1e565b34801561080b57600080fd5b506103b161081a366004613552565b611d8b565b34801561082b57600080fd5b50600a546001600160a01b0316610463565b34801561084957600080fd5b506103b1610858366004613552565b611dea565b34801561086957600080fd5b506103b1610878366004613758565b611e49565b34801561088957600080fd5b506103fd611eb6565b34801561089e57600080fd5b506103fd611ec5565b3480156108b357600080fd5b50610435600e5481565b3480156108c957600080fd5b5061043560115481565b3480156108df57600080fd5b506103b16108ee366004613951565b611ed2565b3480156108ff57600080fd5b5061043561090e366004613662565b60196020526000908152604090205481565b34801561092c57600080fd5b506103b161093b366004613638565b611f97565b34801561094c57600080fd5b506103b161095b36600461398d565b61200d565b34801561096c57600080fd5b506103b161097b3660046139c2565b6120c6565b6103b161098e366004613552565b61214e565b34801561099f57600080fd5b50610435600f5481565b3480156109b557600080fd5b506103b16109c4366004613552565b61236b565b3480156109d557600080fd5b506103fd6123ca565b6103b16109ec366004613552565b6123d7565b3480156109fd57600080fd5b506103fd610a0c366004613552565b61257c565b348015610a1d57600080fd5b5061043561128b81565b348015610a3357600080fd5b50610435600d5481565b348015610a4957600080fd5b506103d3610a58366004613a3e565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a9257600080fd5b506103b1610aa1366004613662565b61262a565b348015610ab257600080fd5b50610435600c5481565b600a546001600160a01b03163314610b1b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b601055565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610b765750610b768261270c565b92915050565b60158054610b8990613a71565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb590613a71565b8015610c025780601f10610bd757610100808354040283529160200191610c02565b820191906000526020600020905b815481529060010190602001808311610be557829003601f168201915b505050505081565b606060008054610c1990613a71565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4590613a71565b8015610c925780601f10610c6757610100808354040283529160200191610c92565b820191906000526020600020905b815481529060010190602001808311610c7557829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610d265760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610b12565b506000908152600460205260409020546001600160a01b031690565b6000610d4d826113ca565b9050806001600160a01b0316836001600160a01b03161415610dd75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610b12565b336001600160a01b0382161480610df35750610df38133610a58565b610e655760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b12565b610e6f83836127ef565b505050565b600a546001600160a01b03163314610ece5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b6001600160a01b03166000908152601860205260409020805460ff19166001179055565b610efc3382612875565b610f6e5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b12565b610e6f83838361297d565b6000610f8483611764565b8210610ff85760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610b12565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b0316331461107b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b6040514790339082156108fc029083906000818181858888f193505050501580156110aa573d6000803e3d6000fd5b5050565b600a546001600160a01b031633146111085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b61128b8161111560085490565b61111f9190613ac2565b111561116d5760405162461bcd60e51b815260206004820152601160248201527f4d494e543a207265616368206c696d69740000000000000000000000000000006044820152606401610b12565b6110aa8282612b6d565b610e6f838383604051806020016040528060008152506120c6565b600a546001600160a01b031633146111ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b805161123a5760405162461bcd60e51b815260206004820152601e60248201527f72657665616c3a2063616e742073657420656d707479206261736555726900006044820152606401610b12565b6017805460ff1916600117905580516110aa9060149060208401906134b9565b600061126560085490565b82106112d95760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610b12565b600882815481106112ec576112ec613ada565b90600052602060002001549050919050565b600a546001600160a01b031633146113585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b80516110aa9060149060208401906134b9565b600a546001600160a01b031633146113c55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b601155565b6000818152600260205260408120546001600160a01b031680610b765760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610b12565b6002600b5414156114a85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b12565b6002600b553360009081526018602052604090205460ff1661150c5760405162461bcd60e51b815260206004820152601360248201527f6e6f7420696e2070726976617465206c697374000000000000000000000000006044820152606401610b12565b6001601754610100900460ff16600481111561152a5761152a6137a1565b146115775760405162461bcd60e51b815260206004820152601960248201527f4d494e543a206e6f7420696e20707269766174652073616c65000000000000006044820152606401610b12565b336000908152601a602052604090205460ff16156115fd5760405162461bcd60e51b815260206004820152602760248201527f4d494e543a20796f7520616c726561647920646f6e652074686520707269766160448201527f74652073616c65000000000000000000000000000000000000000000000000006064820152608401610b12565b600f548111156116755760405162461bcd60e51b815260206004820152602a60248201527f4d494e543a206578636565642070726573616c65206c696d697420706572207460448201527f72616e73616374696f6e000000000000000000000000000000000000000000006064820152608401610b12565b3481600c546116849190613af0565b11156116d25760405162461bcd60e51b815260206004820152601860248201527f4d494e543a20696e73756666696369656e7420657468657200000000000000006044820152606401610b12565b601254816116df60085490565b6116e99190613ac2565b11156117375760405162461bcd60e51b815260206004820152601160248201527f4d494e543a207265616368206c696d69740000000000000000000000000000006044820152606401610b12565b6117413382612b6d565b50336000908152601a60205260409020805460ff19166001908117909155600b55565b60006001600160a01b0382166117e25760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610b12565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146118585760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b6118626000612bad565b565b600a546001600160a01b031633146118be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b600e55565b600a546001600160a01b0316331461191d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b600c55565b600a546001600160a01b0316331461197c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b601780548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360048111156119ba576119ba6137a1565b021790555050565b6002600b541415611a155760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b12565b6002600b556003601754610100900460ff166004811115611a3857611a386137a1565b14611a855760405162461bcd60e51b815260206004820152601660248201527f4d494e543a206e6f7420696e2066726565206d696e74000000000000000000006044820152606401610b12565b33600090815260196020526040902054811115611b0a5760405162461bcd60e51b815260206004820152602160248201527f4d494e543a206578636565642066726565206d696e7420616c6c6f636174696f60448201527f6e000000000000000000000000000000000000000000000000000000000000006064820152608401610b12565b61128b81611b1760085490565b611b219190613ac2565b1115611b6f5760405162461bcd60e51b815260206004820152601160248201527f4d494e543a207265616368206c696d69740000000000000000000000000000006044820152606401610b12565b611b793382612b6d565b3360009081526019602052604081208054839290611b98908490613b2d565b90915550506001600b5550565b600a546001600160a01b03163314611bff5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b600d55565b600a546001600160a01b03163314611c5e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b8051825114611caf5760405162461bcd60e51b815260206004820152600c60248201527f4c656e677468206572726f7200000000000000000000000000000000000000006044820152606401610b12565b815160005b81811015611d1857828181518110611cce57611cce613ada565b602002602001015160196000868481518110611cec57611cec613ada565b6020908102919091018101516001600160a01b0316825281019190915260400160002055600101611cb4565b50505050565b600a546001600160a01b03163314611d785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b80516110aa9060159060208401906134b9565b600a546001600160a01b03163314611de55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b600f55565b600a546001600160a01b03163314611e445760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b601355565b600a546001600160a01b03163314611ea35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b80516110aa9060169060208401906134b9565b606060018054610c1990613a71565b60148054610b8990613a71565b6001600160a01b038216331415611f2b5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b12565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600a546001600160a01b03163314611ff15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b6001600160a01b03909116600090815260196020526040902055565b600a546001600160a01b031633146120675760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b805160005b81811015610e6f5760016018600085848151811061208c5761208c613ada565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905560010161206c565b6120d03383612875565b6121425760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b12565b611d1884848484612c17565b6002600b5414156121a15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b12565b6002600b819055601754610100900460ff1660048111156121c4576121c46137a1565b146122115760405162461bcd60e51b815260206004820152601560248201527f4d494e543a206e6f7420696e207072652d73616c6500000000000000000000006044820152606401610b12565b6010548111156122895760405162461bcd60e51b815260206004820152602a60248201527f4d494e543a206578636565642070726573616c65206c696d697420706572207460448201527f72616e73616374696f6e000000000000000000000000000000000000000000006064820152608401610b12565b3481600d546122989190613af0565b11156122e65760405162461bcd60e51b815260206004820152601860248201527f4d494e543a20696e73756666696369656e7420657468657200000000000000006044820152606401610b12565b6010548114156122f4576001015b6013548161230160085490565b61230b9190613ac2565b11156123595760405162461bcd60e51b815260206004820152601160248201527f4d494e543a207265616368206c696d69740000000000000000000000000000006044820152606401610b12565b6123633382612b6d565b506001600b55565b600a546001600160a01b031633146123c55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b601255565b60168054610b8990613a71565b6002600b54141561242a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b12565b6002600b556004601754610100900460ff16600481111561244d5761244d6137a1565b1461249a5760405162461bcd60e51b815260206004820152601860248201527f4d494e543a206e6f7420696e207075626c69632073616c6500000000000000006044820152606401610b12565b3481600e546124a99190613af0565b11156124f75760405162461bcd60e51b815260206004820152601860248201527f4d494e543a20696e73756666696369656e7420657468657200000000000000006044820152606401610b12565b60115481111561256f5760405162461bcd60e51b815260206004820152602a60248201527f4d494e543a206578636565642070726573616c65206c696d697420706572207460448201527f72616e73616374696f6e000000000000000000000000000000000000000000006064820152608401610b12565b61128b8161230160085490565b60175460609060ff161561259357610b7682612ca0565b601580546125a090613a71565b80601f01602080910402602001604051908101604052809291908181526020018280546125cc90613a71565b80156126195780601f106125ee57610100808354040283529160200191612619565b820191906000526020600020905b8154815290600101906020018083116125fc57829003601f168201915b50505050509050919050565b919050565b600a546001600160a01b031633146126845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b12565b6001600160a01b0381166127005760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b12565b61270981612bad565b50565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061279f57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610b7657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610b76565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038416908117909155819061283c826113ca565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166128ff5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610b12565b600061290a836113ca565b9050806001600160a01b0316846001600160a01b031614806129455750836001600160a01b031661293a84610c9c565b6001600160a01b0316145b8061297557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612990826113ca565b6001600160a01b031614612a0c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610b12565b6001600160a01b038216612a875760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b12565b612a92838383612d89565b612a9d6000826127ef565b6001600160a01b0383166000908152600360205260408120805460019290612ac6908490613b2d565b90915550506001600160a01b0382166000908152600360205260408120805460019290612af4908490613ac2565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60005b81811015610e6f576000612b8360085490565b612b8e906001613ac2565b9050612b9a8482612e41565b5080612ba581613b44565b915050612b70565b600a80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612c2284848461297d565b612c2e84848484612e5b565b611d185760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b12565b6000818152600260205260409020546060906001600160a01b0316612d2d5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610b12565b6000612d37612ff9565b90506000815111612d575760405180602001604052806000815250612d82565b80612d6184613008565b604051602001612d72929190613b7d565b6040516020818303038152906040525b9392505050565b6001600160a01b038316612de457612ddf81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612e07565b816001600160a01b0316836001600160a01b031614612e0757612e07838261313a565b6001600160a01b038216612e1e57610e6f816131d7565b826001600160a01b0316826001600160a01b031614610e6f57610e6f8282613286565b6110aa8282604051806020016040528060008152506132ca565b60006001600160a01b0384163b15612fee576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a0290612eb8903390899088908890600401613bac565b6020604051808303816000875af1925050508015612ef3575060408051601f3d908101601f19168201909252612ef091810190613be8565b60015b612fa3573d808015612f21576040519150601f19603f3d011682016040523d82523d6000602084013e612f26565b606091505b508051612f9b5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b12565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612975565b506001949350505050565b606060148054610c1990613a71565b60608161304857505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613072578061305c81613b44565b915061306b9050600a83613c1b565b915061304c565b60008167ffffffffffffffff81111561308d5761308d6136b9565b6040519080825280601f01601f1916602001820160405280156130b7576020820181803683370190505b5090505b8415612975576130cc600183613b2d565b91506130d9600a86613c2f565b6130e4906030613ac2565b60f81b8183815181106130f9576130f9613ada565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613133600a86613c1b565b94506130bb565b6000600161314784611764565b6131519190613b2d565b6000838152600760205260409020549091508082146131a4576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906131e990600190613b2d565b6000838152600960205260408120546008805493945090928490811061321157613211613ada565b90600052602060002001549050806008838154811061323257613232613ada565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061326a5761326a613c43565b6001900381819060005260206000200160009055905550505050565b600061329183611764565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6132d48383613353565b6132e16000848484612e5b565b610e6f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b12565b6001600160a01b0382166133a95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b12565b6000818152600260205260409020546001600160a01b03161561340e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b12565b61341a60008383612d89565b6001600160a01b0382166000908152600360205260408120805460019290613443908490613ac2565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546134c590613a71565b90600052602060002090601f0160209004810192826134e7576000855561352d565b82601f1061350057805160ff191683800117855561352d565b8280016001018555821561352d579182015b8281111561352d578251825591602001919060010190613512565b5061353992915061353d565b5090565b5b80821115613539576000815560010161353e565b60006020828403121561356457600080fd5b5035919050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461270957600080fd5b6000602082840312156135ab57600080fd5b8135612d828161356b565b60005b838110156135d15781810151838201526020016135b9565b83811115611d185750506000910152565b600081518084526135fa8160208601602086016135b6565b601f01601f19169290920160200192915050565b602081526000612d8260208301846135e2565b80356001600160a01b038116811461262557600080fd5b6000806040838503121561364b57600080fd5b61365483613621565b946020939093013593505050565b60006020828403121561367457600080fd5b612d8282613621565b60008060006060848603121561369257600080fd5b61369b84613621565b92506136a960208501613621565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156136f8576136f86136b9565b604052919050565b600067ffffffffffffffff83111561371a5761371a6136b9565b61372d6020601f19601f860116016136cf565b905082815283838301111561374157600080fd5b828260208301376000602084830101529392505050565b60006020828403121561376a57600080fd5b813567ffffffffffffffff81111561378157600080fd5b8201601f8101841361379257600080fd5b61297584823560208401613700565b634e487b7160e01b600052602160045260246000fd5b60208101600583106137d957634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156137f157600080fd5b813560058110612d8257600080fd5b600067ffffffffffffffff82111561381a5761381a6136b9565b5060051b60200190565b600082601f83011261383557600080fd5b8135602061384a61384583613800565b6136cf565b82815260059290921b8401810191818101908684111561386957600080fd5b8286015b8481101561388b5761387e81613621565b835291830191830161386d565b509695505050505050565b600080604083850312156138a957600080fd5b823567ffffffffffffffff808211156138c157600080fd5b6138cd86838701613824565b93506020915081850135818111156138e457600080fd5b85019050601f810186136138f757600080fd5b803561390561384582613800565b81815260059190911b8201830190838101908883111561392457600080fd5b928401925b8284101561394257833582529284019290840190613929565b80955050505050509250929050565b6000806040838503121561396457600080fd5b61396d83613621565b91506020830135801515811461398257600080fd5b809150509250929050565b60006020828403121561399f57600080fd5b813567ffffffffffffffff8111156139b657600080fd5b61297584828501613824565b600080600080608085870312156139d857600080fd5b6139e185613621565b93506139ef60208601613621565b925060408501359150606085013567ffffffffffffffff811115613a1257600080fd5b8501601f81018713613a2357600080fd5b613a3287823560208401613700565b91505092959194509250565b60008060408385031215613a5157600080fd5b613a5a83613621565b9150613a6860208401613621565b90509250929050565b600181811c90821680613a8557607f821691505b60208210811415613aa657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115613ad557613ad5613aac565b500190565b634e487b7160e01b600052603260045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613b2857613b28613aac565b500290565b600082821015613b3f57613b3f613aac565b500390565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613b7657613b76613aac565b5060010190565b60008351613b8f8184602088016135b6565b835190830190613ba38183602088016135b6565b01949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613bde60808301846135e2565b9695505050505050565b600060208284031215613bfa57600080fd5b8151612d828161356b565b634e487b7160e01b600052601260045260246000fd5b600082613c2a57613c2a613c05565b500490565b600082613c3e57613c3e613c05565b500690565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220aace62c662de5f4dcb3dde5429499b4a0c22d83ea82897f8a7d3da82f0218e3364736f6c634300080a0033
Verified Source Code Partial Match
Compiler: v0.8.10+commit.fc410830
EVM: london
Optimization: Yes (5000 runs)
SamuraiCats.sol 1595 lines
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0 >=0.8.10 <0.9.0;
////// lib/openzeppelin-contracts/contracts/utils/Context.sol
/* pragma solidity ^0.8.0; */
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
////// lib/openzeppelin-contracts/contracts/access/Ownable.sol
/* pragma solidity ^0.8.0; */
/* import "../utils/Context.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() {
_setOwner(_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 {
_setOwner(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");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
////// lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol
/* pragma solidity ^0.8.0; */
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
////// lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol
/* pragma solidity ^0.8.0; */
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
////// lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol
/* pragma solidity ^0.8.0; */
/* import "../../utils/introspection/IERC165.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;
}
////// lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol
/* pragma solidity ^0.8.0; */
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
////// lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol
/* pragma solidity ^0.8.0; */
/* import "../IERC721.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);
}
////// lib/openzeppelin-contracts/contracts/utils/Address.sol
/* pragma solidity ^0.8.0; */
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
////// lib/openzeppelin-contracts/contracts/utils/Strings.sol
/* pragma solidity ^0.8.0; */
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
////// lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol
/* pragma solidity ^0.8.0; */
/* import "./IERC165.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;
}
}
////// lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol
/* pragma solidity ^0.8.0; */
/* import "./IERC721.sol"; */
/* import "./IERC721Receiver.sol"; */
/* import "./extensions/IERC721Metadata.sol"; */
/* import "../../utils/Address.sol"; */
/* import "../../utils/Context.sol"; */
/* import "../../utils/Strings.sol"; */
/* import "../../utils/introspection/ERC165.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}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
/**
* @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);
_balances[from] -= 1;
_balances[to] += 1;
_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 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 {}
}
////// lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Enumerable.sol
/* pragma solidity ^0.8.0; */
/* import "../IERC721.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);
}
////// lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Enumerable.sol
/* pragma solidity ^0.8.0; */
/* import "../ERC721.sol"; */
/* import "./IERC721Enumerable.sol"; */
/**
* @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.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @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-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
/**
* @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` cannot be the zero address.
* - `to` cannot be the zero address.
*
* 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 override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnumeration(from, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (to != from) {
_addTokenToOwnerEnumeration(to, tokenId);
}
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
}
////// src/SamuraiCats.sol
/* pragma solidity ^0.8.10; */
/* import "@openzeppelin/contracts/access/Ownable.sol"; */
/* import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; */
/* import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; */
contract SamuraiCats is ERC721Enumerable, Ownable, ReentrancyGuard {
uint256 public constant maxSupply = 4747;
uint256 public privateSalePrice = 0.12 ether;
uint256 public preSalePrice = 0.17 ether;
uint256 public publicSalePrice = 0.17 ether;
uint256 public maxTokensPerPrivateSaleTx = 20;
uint256 public maxTokensPerPresaleTx = 4;
uint256 public maxTokensPerPublicSaleTx = 5;
/*
* Mint max supply :
* -> Private sale : From 1 to 790
* -> Pre-sale : From 791 to 1970
* -> Public sale : From 1971 to 4747
*/
uint256 public maxSupplyPrivateSale = 790;
uint256 public maxSupplyPresale = 1970;
string public baseUri;
string public unrevealedTokenUri =
"https://samuraicats.mypinata.cloud/ipfs/QmeXn7JZdyLzTud6qgGcDYFjMChJFqLG896yKswGxSBacM";
string public contractUri =
"https://samuraicats.mypinata.cloud/ipfs/QmQsDPxJZYoFFgtGqKgAxrJcDPnWkxQikKxxMPTudoFgGc";
bool public isRevealed;
enum SaleStatus {
NotSale,
PrivateSale,
PreSale,
FreeMint,
PublicSale
}
SaleStatus public currentSaleStatus;
mapping(address => bool) public privateSaleList;
mapping(address => uint256) public freeMintList;
mapping(address => bool) public privateSaleWalletTxStatus;
/*///////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor() ERC721("SamuraiCats by Hiro Ando", "SCHA") {}
/*///////////////////////////////////////////////////////////////
MINT FUNCTIONS
//////////////////////////////////////////////////////////////*/
function mintPrivateSale(uint256 numOfToken) external payable nonReentrant {
require(privateSaleList[msg.sender], "not in private list");
require(
currentSaleStatus == SaleStatus.PrivateSale,
"MINT: not in private sale"
);
require(
!privateSaleWalletTxStatus[msg.sender],
"MINT: you already done the private sale"
);
require(
numOfToken <= maxTokensPerPrivateSaleTx,
"MINT: exceed presale limit per transaction"
);
require(
privateSalePrice * numOfToken <= msg.value,
"MINT: insufficient ether"
);
require(
totalSupply() + numOfToken <= maxSupplyPrivateSale,
"MINT: reach limit"
);
_mintToken(msg.sender, numOfToken);
privateSaleWalletTxStatus[msg.sender] = true;
}
function mintPreSale(uint256 numOfToken) external payable nonReentrant {
require(
currentSaleStatus == SaleStatus.PreSale,
"MINT: not in pre-sale"
);
require(
numOfToken <= maxTokensPerPresaleTx,
"MINT: exceed presale limit per transaction"
);
require(
preSalePrice * numOfToken <= ...
// [truncated — 56192 bytes total]
Read Contract
balanceOf 0x70a08231 → uint256
baseUri 0x9abc8320 → string
contractUri 0xc0e24d5e → string
currentSaleStatus 0x6ed09aae → uint8
freeMintList 0xa5324093 → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isRevealed 0x54214f69 → bool
maxSupply 0xd5abeb01 → uint256
maxSupplyPresale 0x13078948 → uint256
maxSupplyPrivateSale 0x075c7923 → uint256
maxTokensPerPresaleTx 0x736e9010 → uint256
maxTokensPerPrivateSaleTx 0xbc3415a2 → uint256
maxTokensPerPublicSaleTx 0x9ed36d67 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
preSalePrice 0xe757c17d → uint256
privateSaleList 0x4334b479 → bool
privateSalePrice 0xf560d415 → uint256
privateSaleWalletTxStatus 0x42f56630 → bool
publicSalePrice 0x9b6860c8 → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
unrevealedTokenUri 0x06c536ab → string
Write Contract 30 functions
These functions modify contract state and require a wallet transaction to execute.
addToFreeMintList 0xa56f5b19
address addr
uint256 amount
addToPrivateSaleList 0x21b86dd0
address addr
approve 0x095ea7b3
address to
uint256 tokenId
batchAddToFreeMintList 0x7f4c8ca2
address[] addrs
uint256[] amounts
batchAddToPrivateSaleList 0xb0490f61
address[] addrs
freeMint 0x7c928fe9
uint256 numOfToken
mintOwner 0x408cbf94
address to
uint256 numOfToken
mintPreSale 0xb9884772
uint256 numOfToken
mintPrivateSale 0x6dd478e3
uint256 numOfToken
mintToken 0xc634d032
uint256 numOfToken
renounceOwnership 0x715018a6
No parameters
reveal 0x4c261247
string _baseUri
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
setContractURI 0x938e3d7b
string _newUri
setCurrentSaleStatus 0x7bddc97c
uint8 _status
setMaxSupplyPresale 0x8f10d94d
uint256 _maxSupplyPresale
setMaxSupplyPrivateSale 0xbce93fcb
uint256 _maxSupplyPrivateSale
setMaxTokensPerPresaleTx 0x0157ad2d
uint256 _limit
setMaxTokensPerPrivateSaleTx 0x82910481
uint256 _limit
setMaxTokensPerPublicSaleTx 0x5e50689d
uint256 _limit
setPreSalePrice 0x7d7eee42
uint256 _price
setPrivateSalePrice 0x7bc36e04
uint256 _price
setPublicSalePrice 0x791a2519
uint256 _price
setUnrevealedTokenURI 0x820de0c5
string _newUri
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters
Recent Transactions
No transactions found for this address