Address Contract Partially Verified
Address
0x7a94638e232e653A8E44a4e1c260a796d730Fbc4
Balance
0.207000 ETH ($439.59)
Nonce
1
Code Size
13757 bytes
Creator
0x00000100...006C at tx 0xbc2becc1...a062be
Indexed Transactions
0 (1 on-chain, 0.7% indexed)
Contract Bytecode
13757 bytes
0x6080604052600436106103605760003560e01c80637a3cbc0f116101c6578063c4e41b22116100f7578063e36d649811610095578063e985e9c51161006f578063e985e9c5146108a9578063f186d77e146108c9578063f2fde38b146108e9578063fa0770df1461090957610360565b8063e36d649814610854578063e4da3f2814610869578063e58306f91461088957610360565b8063cb774d47116100d1578063cb774d4714610800578063d06a624214610815578063d5abeb011461082a578063dc53fd921461083f57610360565b8063c4e41b22146107b6578063c6ab67a3146107cb578063c87b56dd146107e057610360565b80639e46ab1611610164578063b88d4fde1161013e578063b88d4fde14610736578063bd32fb6614610756578063becacc5b14610776578063c024df441461079657610360565b80639e46ab16146106ec578063a22cb46514610701578063b67c25a31461072157610360565b80638da5cb5b116101a05780638da5cb5b1461068d5780638e9c5b38146106a257806395d89b41146106c2578063980dd703146106d757610360565b80637a3cbc0f1461064e5780637d17fcbe146106635780637d6f389e1461067857610360565b80632db11544116102a05780636352211e1161023e5780636f63b60a116102185780636f63b60a146105ef57806370a0823114610604578063715018a61461062457806374df39c91461063957610360565b80636352211e146105a557806364de1e85146105c55780636c0360eb146105da57610360565b806342842e0e1161027a57806342842e0e14610530578063489c077c1461055057806355f804b3146105655780635d82cf6e1461058557610360565b80632db11544146104f357806335c6aaf8146105065780633ccfd60b1461051b57610360565b806318160ddd1161030d5780632668a3c1116102e75780632668a3c1146104a35780632904e6d9146104b85780632913daa0146104cb5780632d61ad50146104e057610360565b806318160ddd1461044e57806318ff321b1461046357806323b872dd1461048357610360565b8063095ea7b31161033e578063095ea7b3146103ea5780630a76ff241461040c578063109695231461042e57610360565b806301ffc9a71461036557806306fdde031461039b578063081812fc146103bd575b600080fd5b34801561037157600080fd5b50610385610380366004612897565b61091e565b6040516103929190612a43565b60405180910390f35b3480156103a757600080fd5b506103b06109c8565b6040516103929190612a4e565b3480156103c957600080fd5b506103dd6103d836600461287f565b610a5a565b60405161039291906129f3565b3480156103f657600080fd5b5061040a610405366004612729565b610aa6565b005b34801561041857600080fd5b50610421610b3e565b6040516103929190613342565b34801561043a57600080fd5b5061040a6104493660046128cf565b610b44565b34801561045a57600080fd5b50610421610b9a565b34801561046f57600080fd5b5061040a61047e3660046127ef565b610bca565b34801561048f57600080fd5b5061040a61049e36600461263b565b610e43565b3480156104af57600080fd5b50610385610e7b565b61040a6104c6366004612754565b610e84565b3480156104d757600080fd5b50610421610fb9565b61040a6104ee366004612754565b610fbf565b61040a61050136600461287f565b61107c565b34801561051257600080fd5b50610421611186565b34801561052757600080fd5b5061040a61118c565b34801561053c57600080fd5b5061040a61054b36600461263b565b611216565b34801561055c57600080fd5b5061040a611231565b34801561057157600080fd5b5061040a6105803660046128cf565b6112ab565b34801561059157600080fd5b5061040a6105a036600461287f565b6112fd565b3480156105b157600080fd5b506103dd6105c036600461287f565b611341565b3480156105d157600080fd5b506103856113eb565b3480156105e657600080fd5b506103b06113f9565b3480156105fb57600080fd5b5061040a611487565b34801561061057600080fd5b5061042161061f3660046125cb565b611500565b34801561063057600080fd5b5061040a611544565b34801561064557600080fd5b5061040a61158f565b34801561065a57600080fd5b5061042161166f565b34801561066f57600080fd5b5061040a611675565b34801561068457600080fd5b5061040a6116da565b34801561069957600080fd5b506103dd61174b565b3480156106ae57600080fd5b5061040a6106bd36600461287f565b61175a565b3480156106ce57600080fd5b506103b061179e565b3480156106e357600080fd5b506104216117ad565b3480156106f857600080fd5b506104216117b3565b34801561070d57600080fd5b5061040a61071c3660046126f8565b6117b9565b34801561072d57600080fd5b506103856117cb565b34801561074257600080fd5b5061040a61075136600461267b565b6117da565b34801561076257600080fd5b5061040a61077136600461287f565b611819565b34801561078257600080fd5b506103856107913660046125cb565b61185d565b3480156107a257600080fd5b506103856107b136600461287f565b611872565b3480156107c257600080fd5b50610421611887565b3480156107d757600080fd5b506103b061188d565b3480156107ec57600080fd5b506103b06107fb36600461287f565b61189a565b34801561080c57600080fd5b5061042161191d565b34801561082157600080fd5b50610421611923565b34801561083657600080fd5b50610421611929565b34801561084b57600080fd5b5061042161192f565b34801561086057600080fd5b50610421611935565b34801561087557600080fd5b5061042161088436600461287f565b61193b565b34801561089557600080fd5b5061040a6108a4366004612729565b61194d565b3480156108b557600080fd5b506103856108c4366004612603565b6119d3565b3480156108d557600080fd5b5061040a6108e43660046125cb565b611a01565b3480156108f557600080fd5b5061040a6109043660046125cb565b611a7a565b34801561091557600080fd5b50610421611ae8565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806109b157507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806109c057506109c082611aee565b90505b919050565b6060600280546109d79061347a565b80601f0160208091040260200160405190810160405280929190818152602001828054610a039061347a565b8015610a505780601f10610a2557610100808354040283529160200191610a50565b820191906000526020600020905b815481529060010190602001808311610a3357829003601f168201915b5050505050905090565b6000610a6582611b38565b610a8a5760405162461bcd60e51b8152600401610a81906132ae565b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610ab182611341565b9050806001600160a01b0316836001600160a01b03161415610ae55760405162461bcd60e51b8152600401610a8190613001565b806001600160a01b0316610af7611b3f565b6001600160a01b03161480610b135750610b13816108c4611b3f565b610b2f5760405162461bcd60e51b8152600401610a8190612cc2565b610b398383611b43565b505050565b600d5481565b610b4c611b3f565b6001600160a01b0316610b5d61174b565b6001600160a01b031614610b835760405162461bcd60e51b8152600401610a8190612ea4565b8051610b9690600b9060208401906124bc565b5050565b6000610bc5601154610bbf601054610bbf600f54600e54611bc990919063ffffffff16565b90611bc9565b905090565b60175460ff16610bec5760405162461bcd60e51b8152600401610a8190612c54565b600d5481511115610c0f5760405162461bcd60e51b8152600401610a81906130f2565b60005b8151811015610d5d57600954825133916001600160a01b031690636352211e90859085908110610c5257634e487b7160e01b600052603260045260246000fd5b60200260200101516040518263ffffffff1660e01b8152600401610c769190613342565b60206040518083038186803b158015610c8e57600080fd5b505afa158015610ca2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc691906125e7565b6001600160a01b031614610cec5760405162461bcd60e51b8152600401610a8190612c8b565b60186000838381518110610d1057634e487b7160e01b600052603260045260246000fd5b60209081029190910181015182528101919091526040016000205460ff1615610d4b5760405162461bcd60e51b8152600401610a8190612d7c565b80610d55816134b5565b915050610c12565b50610d69338251611bd5565b60005b8151811015610e2757600160186000848481518110610d9b57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548160ff02191690831515021790555080600e54610dd69190613399565b60196000848481518110610dfa57634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020819055508080610e1f906134b5565b915050610d6c565b508051600e6000828254610e3b9190613399565b909155505050565b610e54610e4e611b3f565b82611bef565b610e705760405162461bcd60e51b8152600401610a8190612f6d565b610b39838383611c74565b60175460ff1681565b601754610100900460ff16610eab5760405162461bcd60e51b8152600401610a8190612a61565b336000908152601a602052604090205460ff1615610edb5760405162461bcd60e51b8152600401610a8190612c1d565b601254610ee9908290611e41565b3414610f075760405162461bcd60e51b8152600401610a819061330b565b600033604051602001610f1a919061295f565b604051602081830303815290604052805190602001209050610f3f83601b5483611e4d565b610f5b5760405162461bcd60e51b8152600401610a81906131bd565b610f653383611bd5565b8160106000828254610f779190613399565b9091555050336000908152601a6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055505050565b60015481565b601754610100900460ff16610fe65760405162461bcd60e51b8152600401610a8190612a61565b336000908152601a602052604090205460ff16156110165760405162461bcd60e51b8152600401610a8190612c1d565b601254611024908290611e41565b34146110425760405162461bcd60e51b8152600401610a819061330b565b6000338260405160200161105792919061298f565b604051602081830303815290604052805190602001209050610f3f83601c5483611e4d565b60175462010000900460ff166110a45760405162461bcd60e51b8152600401610a8190612fca565b6000601354116110c65760405162461bcd60e51b8152600401610a8190612e6d565b6013546110d39082611e41565b34146110f15760405162461bcd60e51b8152600401610a819061330b565b6014548111156111135760405162461bcd60e51b8152600401610a8190612a98565b600c5461112282610bbf610b9a565b11156111405760405162461bcd60e51b8152600401610a81906130f2565b61114a3382611bd5565b806011600082825461115c9190613399565b90915550506015541580156111795750600c54611177610b9a565b145b1561118357436015555b50565b60125481565b611194611b3f565b6001600160a01b03166111a561174b565b6001600160a01b0316146111cb5760405162461bcd60e51b8152600401610a8190612ea4565b47806111e95760405162461bcd60e51b8152600401610a8190612dd9565b604051339082156108fc029083906000818181858888f19350505050158015610b96573d6000803e3d6000fd5b610b39838383604051806020016040528060008152506117da565b611239611b3f565b6001600160a01b031661124a61174b565b6001600160a01b0316146112705760405162461bcd60e51b8152600401610a8190612ea4565b601780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff8116620100009182900460ff1615909102179055565b6112b3611b3f565b6001600160a01b03166112c461174b565b6001600160a01b0316146112ea5760405162461bcd60e51b8152600401610a8190612ea4565b8051610b9690600a9060208401906124bc565b611305611b3f565b6001600160a01b031661131661174b565b6001600160a01b03161461133c5760405162461bcd60e51b8152600401610a8190612ea4565b601355565b600061134c82611b38565b6113685760405162461bcd60e51b8152600401610a8190612b2c565b6000600154831061138e576001546113809084613402565b61138b906001613399565b90505b825b8181106113d2576000818152600460205260409020546001600160a01b031680156113bf5792506109c3915050565b50806113ca81613445565b915050611390565b5060405162461bcd60e51b8152600401610a81906131f4565b601754610100900460ff1681565b600a80546114069061347a565b80601f01602080910402602001604051908101604052809291908181526020018280546114329061347a565b801561147f5780601f106114545761010080835404028352916020019161147f565b820191906000526020600020905b81548152906001019060200180831161146257829003601f168201915b505050505081565b61148f611b3f565b6001600160a01b03166114a061174b565b6001600160a01b0316146114c65760405162461bcd60e51b8152600401610a8190612ea4565b601780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff81166101009182900460ff1615909102179055565b60006001600160a01b0382166115285760405162461bcd60e51b8152600401610a8190612d1f565b506001600160a01b031660009081526005602052604090205490565b61154c611b3f565b6001600160a01b031661155d61174b565b6001600160a01b0316146115835760405162461bcd60e51b8152600401610a8190612ea4565b61158d6000611e63565b565b611597611b3f565b6001600160a01b03166115a861174b565b6001600160a01b0316146115ce5760405162461bcd60e51b8152600401610a8190612ea4565b601654156115ee5760405162461bcd60e51b8152600401610a8190613186565b60155461160d5760405162461bcd60e51b8152600401610a8190612be6565b600c5460155461161e9190406134ee565b60165560155460ff90611632904390611ecd565b111561165557600c54611646436001611ecd565b6116519190406134ee565b6016555b60165461158d5760165461166a906001611bc9565b601655565b60105481565b61167d611b3f565b6001600160a01b031661168e61174b565b6001600160a01b0316146116b45760405162461bcd60e51b8152600401610a8190612ea4565b601654156116d45760405162461bcd60e51b8152600401610a8190613186565b43601555565b6116e2611b3f565b6001600160a01b03166116f361174b565b6001600160a01b0316146117195760405162461bcd60e51b8152600401610a8190612ea4565b601780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b6008546001600160a01b031690565b611762611b3f565b6001600160a01b031661177361174b565b6001600160a01b0316146117995760405162461bcd60e51b8152600401610a8190612ea4565b601c55565b6060600380546109d79061347a565b60145481565b600e5481565b610b966117c4611b3f565b8383611ed9565b60175462010000900460ff1681565b6117eb6117e5611b3f565b83611bef565b6118075760405162461bcd60e51b8152600401610a8190612f6d565b61181384848484611f9a565b50505050565b611821611b3f565b6001600160a01b031661183261174b565b6001600160a01b0316146118585760405162461bcd60e51b8152600401610a8190612ea4565b601b55565b601a6020526000908152604090205460ff1681565b60186020526000908152604090205460ff1681565b60005490565b600b80546114069061347a565b60606118a582611b38565b6118c15760405162461bcd60e51b8152600401610a8190612ed9565b60006118cb611fcd565b905060008151116118eb5760405180602001604052806000815250611916565b806118f584611fdc565b6040516020016119069291906129c4565b6040516020818303038152906040525b9392505050565b60165481565b600f5481565b600c5481565b60135481565b60155481565b60196020526000908152604090205481565b611955611b3f565b6001600160a01b031661196661174b565b6001600160a01b03161461198c5760405162461bcd60e51b8152600401610a8190612ea4565b600d548111156119ae5760405162461bcd60e51b8152600401610a81906130f2565b6119b88282611bd5565b80600f60008282546119ca9190613399565b90915550505050565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b611a09611b3f565b6001600160a01b0316611a1a61174b565b6001600160a01b031614611a405760405162461bcd60e51b8152600401610a8190612ea4565b600980547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b611a82611b3f565b6001600160a01b0316611a9361174b565b6001600160a01b031614611ab95760405162461bcd60e51b8152600401610a8190612ea4565b6001600160a01b038116611adf5760405162461bcd60e51b8152600401610a8190612acf565b61118381611e63565b60115481565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b6000541190565b3390565b600081815260066020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091558190611b9082611341565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006119168284613399565b610b9682826040518060200160405280600081525061212b565b6000611bfa82611b38565b611c165760405162461bcd60e51b8152600401610a8190613251565b6000611c2183611341565b9050806001600160a01b0316846001600160a01b03161480611c5c5750836001600160a01b0316611c5184610a5a565b6001600160a01b0316145b80611c6c5750611c6c81856119d3565b949350505050565b826001600160a01b0316611c8782611341565b6001600160a01b031614611cad5760405162461bcd60e51b8152600401610a8190612e10565b6001600160a01b038216611cd35760405162461bcd60e51b8152600401610a8190612b89565b611cde838383610b39565b611ce9600082611b43565b6001600160a01b0383166000908152600560205260408120805460019290611d12908490613402565b90915550506001600160a01b0382166000908152600560205260408120805460019290611d40908490613399565b90915550506000818152600460208190526040822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861617905581611d92846001613399565b81526020810191909152604001600020546001600160a01b03161415611df5578260046000611dc2846001613399565b815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610b39838383610b39565b600061191682846133c5565b600082611e5a8584612298565b14949350505050565b600880546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006119168284613402565b816001600160a01b0316836001600160a01b03161415611f0b5760405162461bcd60e51b8152600401610a8190612f36565b6001600160a01b038381166000818152600760209081526040808320948716808452949091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611f8d908590612a43565b60405180910390a3505050565b611fa5848484611c74565b611fb184848484612312565b6118135760405162461bcd60e51b8152600401610a819061305e565b6060600a80546109d79061347a565b60608161201d575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526109c3565b8160005b81156120475780612031816134b5565b91506120409050600a836133b1565b9150612021565b60008167ffffffffffffffff81111561207057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561209a576020820181803683370190505b5090505b8415611c6c576120af600183613402565b91506120bc600a866134ee565b6120c7906030613399565b60f81b8183815181106120ea57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612124600a866133b1565b945061209e565b6000546001600160a01b0384166121545760405162461bcd60e51b8152600401610a8190613129565b61215d81611b38565b1561217a5760405162461bcd60e51b8152600401610a81906130bb565b6121876000858386611813565b6001600160a01b038416600090815260056020526040812080548592906121af908490613399565b9091555050600081815260046020526040812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03871617905581905b8481101561227f5760405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46122436000878487612312565b61225f5760405162461bcd60e51b8152600401610a819061305e565b81612269816134b5565b9250508080612277906134b5565b9150506121f6565b50600081815561229190868487611813565b5050505050565b600081815b845181101561230a5760008582815181106122c857634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116122ea576122e3838261247c565b92506122f7565b6122f4818461247c565b92505b5080612302816134b5565b91505061229d565b509392505050565b6000612326846001600160a01b031661248b565b1561247157836001600160a01b031663150b7a02612342611b3f565b8786866040518563ffffffff1660e01b81526004016123649493929190612a07565b602060405180830381600087803b15801561237e57600080fd5b505af19250505080156123cc575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526123c9918101906128b3565b60015b612426573d8080156123fa576040519150601f19603f3d011682016040523d82523d6000602084013e6123ff565b606091505b50805161241e5760405162461bcd60e51b8152600401610a819061305e565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611c6c565b506001949350505050565b60009182526020526040902090565b600080826001600160a01b0316803b806020016040519081016040528181526000908060200190933c511192915050565b8280546124c89061347a565b90600052602060002090601f0160209004810192826124ea5760008555612530565b82601f1061250357805160ff1916838001178555612530565b82800160010185558215612530579182015b82811115612530578251825591602001919060010190612515565b5061253c929150612540565b5090565b5b8082111561253c5760008155600101612541565b600067ffffffffffffffff83111561256f5761256f61352e565b6125a060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601160161334b565b90508281528383830111156125b457600080fd5b828260208301376000602084830101529392505050565b6000602082840312156125dc578081fd5b813561191681613544565b6000602082840312156125f8578081fd5b815161191681613544565b60008060408385031215612615578081fd5b823561262081613544565b9150602083013561263081613544565b809150509250929050565b60008060006060848603121561264f578081fd5b833561265a81613544565b9250602084013561266a81613544565b929592945050506040919091013590565b60008060008060808587031215612690578081fd5b843561269b81613544565b935060208501356126ab81613544565b925060408501359150606085013567ffffffffffffffff8111156126cd578182fd5b8501601f810187136126dd578182fd5b6126ec87823560208401612555565b91505092959194509250565b6000806040838503121561270a578182fd5b823561271581613544565b915060208301358015158114612630578182fd5b6000806040838503121561273b578182fd5b823561274681613544565b946020939093013593505050565b60008060408385031215612766578182fd5b823567ffffffffffffffff81111561277c578283fd5b8301601f8101851361278c578283fd5b803560206127a161279c83613375565b61334b565b82815281810190848301838502860184018a10156127bd578788fd5b8795505b848610156127df5780358352600195909501949183019183016127c1565b5098969091013596505050505050565b60006020808385031215612801578182fd5b823567ffffffffffffffff811115612817578283fd5b8301601f81018513612827578283fd5b803561283561279c82613375565b8181528381019083850185840285018601891015612851578687fd5b8694505b83851015612873578035835260019490940193918501918501612855565b50979650505050505050565b600060208284031215612890578081fd5b5035919050565b6000602082840312156128a8578081fd5b813561191681613559565b6000602082840312156128c4578081fd5b815161191681613559565b6000602082840312156128e0578081fd5b813567ffffffffffffffff8111156128f6578182fd5b8201601f81018413612906578182fd5b611c6c84823560208401612555565b6000815180845261292d816020860160208601613419565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815260140190565b60609290921b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000168252601482015260340190565b600083516129d6818460208801613419565b8351908301906129ea818360208801613419565b01949350505050565b6001600160a01b0391909116815260200190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612a396080830184612915565b9695505050505050565b901515815260200190565b6000602082526119166020830184612915565b60208082526019908201527f57686974656c697374206d696e74206973207061757365642e00000000000000604082015260600190565b6020808252601d908201527f43616e2774206d696e742074686174206d616e79206174206f6e63652e000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f455243373231413a206f776e657220717565727920666f72206e6f6e6578697360408201527f74656e7420746f6b656e00000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f455243373231413a207472616e7366657220746f20746865207a65726f20616460408201527f6472657373000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f5374617274696e6720696e64657820626c6f636b206e6f74207365742e000000604082015260600190565b6020808252600f908201527f416c7265616479206d696e7465642e0000000000000000000000000000000000604082015260600190565b60208082526016908201527f486f6c646572206d696e74206973207061757365642e00000000000000000000604082015260600190565b60208082526017908201527f596f7520646f6e2774206f776e2074686973206f6e652e000000000000000000604082015260600190565b60208082526039908201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f76656420666f7220616c6c00000000000000606082015260800190565b6020808252602b908201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60408201527f65726f2061646472657373000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f54686973206f6e652077617320616c7265616479207573656420666f72206d6960408201527f6e74696e672e0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600c908201527f42616c616e636520697320300000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f455243373231413a207472616e736665722066726f6d20696e636f727265637460408201527f206f776e65720000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f5075626c6963206d696e74207072696365206e6f74207365742e000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000606082015260800190565b6020808252601a908201527f455243373231413a20617070726f766520746f2063616c6c6572000000000000604082015260600190565b60208082526032908201527f455243373231413a207472616e736665722063616c6c6572206973206e6f742060408201527f6f776e6572206e6f7220617070726f7665640000000000000000000000000000606082015260800190565b60208082526016908201527f5075626c6963206d696e74206973207061757365642e00000000000000000000604082015260600190565b60208082526022908201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60408201527f6572000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527f6563656976657220696d706c656d656e74657200000000000000000000000000606082015260800190565b6020808252601d908201527f455243373231413a20746f6b656e20616c7265616479206d696e746564000000604082015260600190565b60208082526015908201527f43616e2774206d696e742074686174206d616e792e0000000000000000000000604082015260600190565b60208082526021908201527f455243373231413a206d696e7420746f20746865207a65726f2061646472657360408201527f7300000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f5374617274696e6720696e64657820616c7265616479207365742e0000000000604082015260600190565b6020808252600e908201527f496e76616c69642070726f6f662e000000000000000000000000000000000000604082015260600190565b6020808252602f908201527f455243373231413a20756e61626c6520746f2064657465726d696e652074686560408201527f206f776e6572206f6620746f6b656e0000000000000000000000000000000000606082015260800190565b6020808252602d908201527f455243373231413a206f70657261746f7220717565727920666f72206e6f6e6560408201527f78697374656e7420746f6b656e00000000000000000000000000000000000000606082015260800190565b6020808252602d908201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560408201527f78697374656e7420746f6b656e00000000000000000000000000000000000000606082015260800190565b60208082526013908201527f496e73756666696369656e742066756e64732e00000000000000000000000000604082015260600190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561336d5761336d61352e565b604052919050565b600067ffffffffffffffff82111561338f5761338f61352e565b5060209081020190565b600082198211156133ac576133ac613502565b500190565b6000826133c0576133c0613518565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133fd576133fd613502565b500290565b60008282101561341457613414613502565b500390565b60005b8381101561343457818101518382015260200161341c565b838111156118135750506000910152565b60008161345457613454613502565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60028104600182168061348e57607f821691505b602082108114156134af57634e487b7160e01b600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156134e7576134e7613502565b5060010190565b6000826134fd576134fd613518565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461118357600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461118357600080fdfea26469706673582212207a22df7f68a496a33697571902d2346760033d22c8991c7b01d36f3e05a09d2864736f6c63430008000033
Verified Source Code Partial Match
Compiler: v0.8.0+commit.c7dfd78e
EVM: istanbul
Optimization: Yes (8888 runs)
Companions.sol 1721 lines
// SPDX-License-Identifier: MIT
// ................................................................................
// ..........................................................................
// ............8888........................................................
// ..........8::8............888888888888................................
// .......888.........88D~~~~~~~~~~~~88..............................
// ......88........8~~~~~~~~~~~~~~~~~DD............................
// ......................888...~8:~8~~~~~~~~~~~~~~~~~~~~8..........................
// ........................8...888D~~~~~~~~~~~~~~~~~~~~~8..........................
// ........................8.8D~~~~~~~~~~~~~~~~~~~~~~~~~~88........................
// ........................88~~~~~~~~~~~~~~~~~~~~~~~~~~~~88........................
// ........................:8~~~~~~~~~~~~~888888N~~~~~~~~88........................
// ........................8~~~~~~~~..:8888D..:8888D8~:~~8D........................
// ........................8~~~~~~~88................888~~~8.......................
// ........................8~~~~~888..................:8~~~8.......................
// ........................8~~~~~88....:88........88..:88~~8.......................
// ................ ...:8~~~~88D....8 8......8 8..:8~~8.......................
// ............:. .8~~~~8......8 8......8 8..:8~~8.......................
// ............ .8~~~~888....8 8......8 8..:8~~8.......................
// ............ .8~~~~~88....:88~......:88..:88~~8.......................
// ............ .8~~~~~888................:888~~~8.......................
// ........ .8~~~~~~~88..............:88:~~~~8.......................
// ........ .8~~~~~~~~8888888......8888~~~~~~8.......................
// ........:...............8~~~~~~~~~~~8~DDDDDDDDD~~~~~~~~~8.......................
// ........................8~~~~~~~~~~~8~~~~~~~~~~~~~~~~~~~8.......................
// .........................8~~~~~~~~~~8~~~:D8DDDDDD~~~~~88........................
// .........................8888~~~~~~~~8~~~~D8..8D~~~~~888........................
// .........................8===D8D~~~~~8~~~~~~88~~~~~~88..........................
// .........................8==D===888D~8~~~~~~~~~~8888=8..........................
// .........................8==D=======++88++++++++=====8..........................
// ........................88==D=========88=============8..........................
// ......................88==88D=========88============8=88........................
// .....................8=====+8888=====8==========8888====8.......................
// ....................D====888====8888888888888888========88......................
// ..................88===+D8=========+88======++++++88O++==8......................
// .................8?===88==========88=888888888++++++=8====88D...................
// .................8===888=========8===8================88===+8...................
// .................8===8===========8===888========8..8==88===+8...................
// ................8==+88==========8=====88========8..88=88=====8..................
// ................8==+D===========D=====88========88..8=888====8..................
// ................8==+D=========88======88=========+8.8==+8====8..................
// ................8=88=========888======88===============+8====D88................
// ................8=88=========8===88888D8===============+8=====88................
// ................8=88=========8888D8D=D=8===============+8=====88................
// ................8=88=========8=+DDD====================+8=====88................
// ................8=88========8888=======================+8=====88................
// ................8=88========88=========================+8=====88................
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);
}
/**
* @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;
}
/**
* @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);
}
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
// File: @openzeppelin/contracts/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
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
/**
* @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;
}
}
/**
* @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);
}
}
/**
* @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;
}
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721A] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
uint256 private currentIndex = 0;
uint256 public maxBatchSize = 35;
// 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), "ERC721A: balance query for the zero address");
return _balances[owner];
}
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721A: owner query for nonexistent token");
uint256 lowestTokenToCheck;
if (tokenId >= maxBatchSize) {
lowestTokenToCheck = tokenId - maxBatchSize + 1;
}
for (uint256 curr = tokenId; curr >= lowestTokenToCheck; curr--) {
address owner = _owners[curr];
if (owner != address(0)) {
return owner;
}
}
revert("ERC721A: unable to determine the owner of token");
}
/**
* @dev See {IERC721-ownerOf}.
*/
// function ownerOf(uint256 tokenId) public view virtual override returns (address) {
// return ownershipOf(tokenId);
// }
/**
* @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 = ERC721A.ownerOf(tokenId);
require(to != owner, "ERC721A: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721A: 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), "ERC721A: 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), "ERC721A: 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), "ERC721A: 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 ERC721A 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), "ERC721A: 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 < currentIndex;
}
/**
* @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), "ERC721A: operator query for nonexistent token");
address owner = ERC721A.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 quantity) internal virtual {
_safeMint(to, quantity, "");
}
/**
* @dev Same as {xref-ERC721A-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal virtual {
uint256 startTokenId = currentIndex;
require(to != address(0), "ERC721A: mint to the zero address");
require(!_exists(startTokenId), "ERC721A: token already minted");
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
_balances[to] += quantity;
_owners[startTokenId] =to;
uint256 updatedIndex = startTokenId;
for (uint256 i = 0; i < quantity; i++) {
emit Transfer(address(0), to, updatedIndex);
require(
_checkOnERC721Received(address(0), to, updatedIndex, _data),
"ERC721A: transfer to non ERC721Receiver implementer"
);
updatedIndex++;
}
currentIndex = updatedIndex;
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @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 = ERC721A.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721A.ownerOf(tokenId) == from, "ERC721A: transfer from incorrect owner");
require(to != address(0), "ERC721A: 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;
if(_owners[tokenId+1] == address(0))
_owners[tokenId+1] = from;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721A.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, "ERC721A: 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("ERC721A: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
function getTotalSupply() public view returns(uint256) {
return currentIndex;
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
/**
* @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);
}
}
/**
* @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)
}
}
}
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
contract Companions is ERC721A, Ownable
{
using SafeMath for uint256;
IERC721 starContract;
string public baseURI;
string public provenanceHash;
uint256 public maxSupply = 10000;
uint256 public maxBatchAmount = 400;
uint256 public holderMintedAmount;
uint256 public adminMintedAmount;
uint256 public whitelistMintedAmount;
uint256 public publicMintedAmount;
uint256 public whitelistMintPrice = 0.042 ether;
uint256 public publicMintPrice;
uint256 public publicMaxPerTransaction = 10;
uint256 public startingIndexBlock;
uint256 public startingIndex;
bool public holderMintActive = false;
bool public whitelistMintActive = false;
bool public publicMintActive = false;
mapping(uint256 => bool) public usedStarIds;
mapping(uint256 => uint256) public matchStarComp;
mapping(address => bool) public mintedWhitelist;
bytes32 private whitelistRoot;
bytes32 private tieredWhitelistRoot;
/**
* @dev TheSolaVerse: Companions
*/
constructor() ERC721A("The SolaVerse: Companions", "Companion") {}
/**
* @dev Calculate the total amount minted so far.
*/
function totalSupply() public view returns (uint256)
{
return holderMintedAmount.add(adminMintedAmount).add(whitelistMintedAmount).add(publicMintedAmount);
}
/**
* @dev SOLA-STAR holder wallets.
*/
function holderMint(uint256[] memory _ids) public
{
require(holderMintActive, "Holder mint is paused.");
require(_ids.length <= maxBatchAmount, "Can't mint that many.");
for (uint256 i=0; i<_ids.length; i++)
{
require(starContract.ownerOf(_ids[i]) == msg.sender, "You don't own this one.");
require(!usedStarIds[_ids[i]], "This one was already used for minting.");
}
_safeMint(msg.sender, _ids.length);
for (uint256 i=0; i<_ids.length; i++)
{
usedStarIds[_ids[i]] = true;
matchStarComp[_ids[i]] = holderMintedAmount + i;
}
holderMintedAmount += _ids.length;
}
/**
* @dev Whitelisted wallets.
*/
function whitelistMint(bytes32[] memory _proof, uint256 _num_tokens) public payable
{
require(whitelistMintActive, "Whitelist mint is paused.");
require(mintedWhitelist[msg.sender] == false, "Already minted.");
require(msg.value == _num_tokens.mul(whitelistMintPrice), "Insufficient funds.");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_proof, whitelistRoot, leaf), "Invalid proof.");
_safeMint(msg.sender, _num_tokens);
whitelistMintedAmount += _num_tokens;
mintedWhitelist[msg.sender] = true;
}
/**
* @dev Whitelisted wallets with Tiers.
*/
function tieredWhitelistMint(bytes32[] memory _proof, uint256 _num_tokens) public payable
{
require(whitelistMintActive, "Whitelist mint is paused.");
require(mintedWhitelist[msg.sender] == false, "Already minted.");
require(msg.value == _num_tokens.mul(whitelistMintPrice), "Insufficient funds.");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _num_tokens));
require(MerkleProof.verify(_proof, tieredWhitelistRoot, leaf), "Invalid proof.");
_safeMint(msg.sender, _num_tokens);
whitelistMintedAmount += _num_tokens;
mintedWhitelist[msg.sender] = true;
}
/**
* @dev Public mint.
*/
function publicMint(uint256 _num_tokens) public payable
{
require(publicMintActive, "Public mint is paused.");
require(publicMintPrice > 0, "Public mint price not set.");
require(msg.value == publicMintPrice.mul(_num_tokens), "Insufficient funds.");
require(_num_tokens <= publicMaxPerTransaction, "Can't mint that many at once.");
require(totalSupply().add(_num_tokens) <= maxSupply, "Can't mint that many.");
_safeMint(msg.sender, _num_tokens);
publicMintedAmount += _num_tokens;
if (startingIndexBlock == 0 && (totalSupply() == maxSupply))
{
startingIndexBlock = block.number;
}
}
/**
* @dev Admin mint.
*/
function adminMint(address _to, uint256 _num_tokens) public onlyOwner
{
require(_num_tokens <= maxBatchAmount, "Can't mint that many.");
_safeMint(_to, _num_tokens);
adminMintedAmount += _num_tokens;
}
/**
* @dev Link to the SOLA-STAR NFT contract to check ownership during holderMint.
*/
function setStarContract(address _addr) public onlyOwner
{
starContract = IERC721(_addr);
}
/**
* @dev Set the Merkle Root for the Whitelist.
*/
function setWhitelistMerkleRoot(bytes32 _root) public onlyOwner
{
whitelistRoot = _root;
}
/**
* @dev Set the Merkle Root for the Tiered Whitelist.
*/
function setTieredWhitelistMerkleRoot(bytes32 _root) public onlyOwner
{
tieredWhitelistRoot = _root;
}
/**
* @dev Toggle the Holder Mint status.
*/
function toggleHolderMint() public onlyOwner
{
holderMintActive = !holderMintActive;
}
/**
* @dev Toggle the Whitelist Mint status.
*/
function toggleWhitelistMint() public onlyOwner
{
whitelistMintActive = !whitelist...
// [truncated — 51948 bytes total]
Read Contract
adminMintedAmount 0xd06a6242 → uint256
balanceOf 0x70a08231 → uint256
baseURI 0x6c0360eb → string
getApproved 0x081812fc → address
getTotalSupply 0xc4e41b22 → uint256
holderMintActive 0x2668a3c1 → bool
holderMintedAmount 0x9e46ab16 → uint256
isApprovedForAll 0xe985e9c5 → bool
matchStarComp 0xe4da3f28 → uint256
maxBatchAmount 0x0a76ff24 → uint256
maxBatchSize 0x2913daa0 → uint256
maxSupply 0xd5abeb01 → uint256
mintedWhitelist 0xbecacc5b → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
provenanceHash 0xc6ab67a3 → string
publicMaxPerTransaction 0x980dd703 → uint256
publicMintActive 0xb67c25a3 → bool
publicMintPrice 0xdc53fd92 → uint256
publicMintedAmount 0xfa0770df → uint256
startingIndex 0xcb774d47 → uint256
startingIndexBlock 0xe36d6498 → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
usedStarIds 0xc024df44 → bool
whitelistMintActive 0x64de1e85 → bool
whitelistMintPrice 0x35c6aaf8 → uint256
whitelistMintedAmount 0x7a3cbc0f → uint256
Write Contract 24 functions
These functions modify contract state and require a wallet transaction to execute.
adminMint 0xe58306f9
address _to
uint256 _num_tokens
approve 0x095ea7b3
address to
uint256 tokenId
emergencySetStartingIndexBlock 0x7d17fcbe
No parameters
finalizeStartingIndex 0x74df39c9
No parameters
holderMint 0x18ff321b
uint256[] _ids
publicMint 0x2db11544
uint256 _num_tokens
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 _newBaseURI
setProvenanceHash 0x10969523
string _provenance_hash
setPublicMintPrice 0x5d82cf6e
uint256 _price
setStarContract 0xf186d77e
address _addr
setTieredWhitelistMerkleRoot 0x8e9c5b38
bytes32 _root
setWhitelistMerkleRoot 0xbd32fb66
bytes32 _root
tieredWhitelistMint 0x2d61ad50
bytes32[] _proof
uint256 _num_tokens
toggleHolderMint 0x7d6f389e
No parameters
toggleWhitelistMint 0x6f63b60a
No parameters
togglepublicMint 0x489c077c
No parameters
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
whitelistMint 0x2904e6d9
bytes32[] _proof
uint256 _num_tokens
withdraw 0x3ccfd60b
No parameters
Recent Transactions
This address has 1 on-chain transactions, but only 0.7% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →