Address Contract Partially Verified
Address
0x9b93C373447d5035A428DfbFB772f28cB17D3420
Balance
0 ETH
Nonce
1
Code Size
15529 bytes
Creator
0xb5835171...a23D at tx 0x54d29b6d...6e99b8
Indexed Transactions
0
Contract Bytecode
15529 bytes
0x6080604052600436106101cd5760003560e01c806370a08231116100f7578063a22cb46511610095578063d5abeb0111610064578063d5abeb0114610653578063e985e9c51461067e578063efbd73f4146106bb578063f2fde38b146106e4576101cd565b8063a22cb4651461059b578063b071401b146105c4578063b88d4fde146105ed578063c87b56dd14610616576101cd565b80638da5cb5b116100d15780638da5cb5b146104fe57806394354fd01461052957806395d89b4114610554578063a0712d681461057f576101cd565b806370a0823114610481578063715018a6146104be5780637ec4a659146104d5576101cd565b806323b872dd1161016f57806344a0d68a1161013e57806344a0d68a146103c55780635503a0e8146103ee57806362b99ad4146104195780636352211e14610444576101cd565b806323b872dd1461031f5780633ccfd60b1461034857806342842e0e1461035f578063438b630014610388576101cd565b8063095ea7b3116101ab578063095ea7b31461027757806313faede6146102a057806316ba10e0146102cb57806318160ddd146102f4576101cd565b806301ffc9a7146101d257806306fdde031461020f578063081812fc1461023a575b600080fd5b3480156101de57600080fd5b506101f960048036038101906101f4919061293f565b61070d565b6040516102069190612fae565b60405180910390f35b34801561021b57600080fd5b506102246107ef565b6040516102319190612fc9565b60405180910390f35b34801561024657600080fd5b50610261600480360381019061025c91906129e2565b610881565b60405161026e9190612f25565b60405180910390f35b34801561028357600080fd5b5061029e600480360381019061029991906128ff565b610906565b005b3480156102ac57600080fd5b506102b5610a1e565b6040516102c2919061324b565b60405180910390f35b3480156102d757600080fd5b506102f260048036038101906102ed9190612999565b610a24565b005b34801561030057600080fd5b50610309610aba565b604051610316919061324b565b60405180910390f35b34801561032b57600080fd5b50610346600480360381019061034191906127e9565b610acb565b005b34801561035457600080fd5b5061035d610b2b565b005b34801561036b57600080fd5b50610386600480360381019061038191906127e9565b610c27565b005b34801561039457600080fd5b506103af60048036038101906103aa919061277c565b610c47565b6040516103bc9190612f8c565b60405180910390f35b3480156103d157600080fd5b506103ec60048036038101906103e791906129e2565b610d52565b005b3480156103fa57600080fd5b50610403610dd8565b6040516104109190612fc9565b60405180910390f35b34801561042557600080fd5b5061042e610e66565b60405161043b9190612fc9565b60405180910390f35b34801561045057600080fd5b5061046b600480360381019061046691906129e2565b610ef4565b6040516104789190612f25565b60405180910390f35b34801561048d57600080fd5b506104a860048036038101906104a3919061277c565b610fa6565b6040516104b5919061324b565b60405180910390f35b3480156104ca57600080fd5b506104d361105e565b005b3480156104e157600080fd5b506104fc60048036038101906104f79190612999565b6110e6565b005b34801561050a57600080fd5b5061051361117c565b6040516105209190612f25565b60405180910390f35b34801561053557600080fd5b5061053e6111a6565b60405161054b919061324b565b60405180910390f35b34801561056057600080fd5b506105696111ac565b6040516105769190612fc9565b60405180910390f35b610599600480360381019061059491906129e2565b61123e565b005b3480156105a757600080fd5b506105c260048036038101906105bd91906128bf565b611347565b005b3480156105d057600080fd5b506105eb60048036038101906105e691906129e2565b61135d565b005b3480156105f957600080fd5b50610614600480360381019061060f919061283c565b6113e3565b005b34801561062257600080fd5b5061063d600480360381019061063891906129e2565b611445565b60405161064a9190612fc9565b60405180910390f35b34801561065f57600080fd5b506106686114ef565b604051610675919061324b565b60405180910390f35b34801561068a57600080fd5b506106a560048036038101906106a091906127a9565b6114f5565b6040516106b29190612fae565b60405180910390f35b3480156106c757600080fd5b506106e260048036038101906106dd9190612a0f565b611589565b005b3480156106f057600080fd5b5061070b6004803603810190610706919061277c565b6116bf565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806107d857507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107e857506107e7826117b7565b5b9050919050565b6060600080546107fe90613554565b80601f016020809104026020016040519081016040528092919081815260200182805461082a90613554565b80156108775780601f1061084c57610100808354040283529160200191610877565b820191906000526020600020905b81548152906001019060200180831161085a57829003601f168201915b5050505050905090565b600061088c82611821565b6108cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c29061316b565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061091182610ef4565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610982576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610979906131cb565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166109a161188d565b73ffffffffffffffffffffffffffffffffffffffff1614806109d057506109cf816109ca61188d565b6114f5565b5b610a0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a06906130eb565b60405180910390fd5b610a198383611895565b505050565b600a5481565b610a2c61188d565b73ffffffffffffffffffffffffffffffffffffffff16610a4a61117c565b73ffffffffffffffffffffffffffffffffffffffff1614610aa0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a979061318b565b60405180910390fd5b8060099080519060200190610ab6929190612590565b5050565b6000610ac6600761194e565b905090565b610adc610ad661188d565b8261195c565b610b1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b129061320b565b60405180910390fd5b610b26838383611a3a565b505050565b610b3361188d565b73ffffffffffffffffffffffffffffffffffffffff16610b5161117c565b73ffffffffffffffffffffffffffffffffffffffff1614610ba7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9e9061318b565b60405180910390fd5b6000610bb161117c565b73ffffffffffffffffffffffffffffffffffffffff1647604051610bd490612f10565b60006040518083038185875af1925050503d8060008114610c11576040519150601f19603f3d011682016040523d82523d6000602084013e610c16565b606091505b5050905080610c2457600080fd5b50565b610c42838383604051806020016040528060008152506113e3565b505050565b60606000610c5483610fa6565b905060008167ffffffffffffffff811115610c7257610c716136ed565b5b604051908082528060200260200182016040528015610ca05781602001602082028036833780820191505090505b50905060006001905060005b8381108015610cbd5750600b548211155b15610d46576000610ccd83610ef4565b90508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610d325782848381518110610d1757610d166136be565b5b6020026020010181815250508180610d2e906135b7565b9250505b8280610d3d906135b7565b93505050610cac565b82945050505050919050565b610d5a61188d565b73ffffffffffffffffffffffffffffffffffffffff16610d7861117c565b73ffffffffffffffffffffffffffffffffffffffff1614610dce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc59061318b565b60405180910390fd5b80600a8190555050565b60098054610de590613554565b80601f0160208091040260200160405190810160405280929190818152602001828054610e1190613554565b8015610e5e5780601f10610e3357610100808354040283529160200191610e5e565b820191906000526020600020905b815481529060010190602001808311610e4157829003601f168201915b505050505081565b60088054610e7390613554565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9f90613554565b8015610eec5780601f10610ec157610100808354040283529160200191610eec565b820191906000526020600020905b815481529060010190602001808311610ecf57829003601f168201915b505050505081565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610f9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f949061312b565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611017576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100e9061310b565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61106661188d565b73ffffffffffffffffffffffffffffffffffffffff1661108461117c565b73ffffffffffffffffffffffffffffffffffffffff16146110da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d19061318b565b60405180910390fd5b6110e46000611ca1565b565b6110ee61188d565b73ffffffffffffffffffffffffffffffffffffffff1661110c61117c565b73ffffffffffffffffffffffffffffffffffffffff1614611162576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111599061318b565b60405180910390fd5b8060089080519060200190611178929190612590565b5050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600c5481565b6060600180546111bb90613554565b80601f01602080910402602001604051908101604052809291908181526020018280546111e790613554565b80156112345780601f1061120957610100808354040283529160200191611234565b820191906000526020600020905b81548152906001019060200180831161121757829003601f168201915b5050505050905090565b806000811180156112515750600c548111155b611290576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112879061306b565b60405180910390fd5b600b548161129e600761194e565b6112a89190613389565b11156112e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e0906131eb565b60405180910390fd5b81600a546112f79190613410565b341015611339576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113309061322b565b60405180910390fd5b6113433383611d67565b5050565b61135961135261188d565b8383611da7565b5050565b61136561188d565b73ffffffffffffffffffffffffffffffffffffffff1661138361117c565b73ffffffffffffffffffffffffffffffffffffffff16146113d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d09061318b565b60405180910390fd5b80600c8190555050565b6113f46113ee61188d565b8361195c565b611433576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142a9061320b565b60405180910390fd5b61143f84848484611f14565b50505050565b606061145082611821565b61148f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611486906131ab565b60405180910390fd5b6000611499611f70565b905060008151116114b957604051806020016040528060008152506114e7565b806114c384612002565b60096040516020016114d793929190612edf565b6040516020818303038152906040525b915050919050565b600b5481565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b8160008111801561159c5750600c548111155b6115db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d29061306b565b60405180910390fd5b600b54816115e9600761194e565b6115f39190613389565b1115611634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162b906131eb565b60405180910390fd5b61163c61188d565b73ffffffffffffffffffffffffffffffffffffffff1661165a61117c565b73ffffffffffffffffffffffffffffffffffffffff16146116b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a79061318b565b60405180910390fd5b6116ba8284611d67565b505050565b6116c761188d565b73ffffffffffffffffffffffffffffffffffffffff166116e561117c565b73ffffffffffffffffffffffffffffffffffffffff161461173b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117329061318b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156117ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a29061300b565b60405180910390fd5b6117b481611ca1565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661190883610ef4565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081600001549050919050565b600061196782611821565b6119a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199d906130cb565b60405180910390fd5b60006119b183610ef4565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611a2057508373ffffffffffffffffffffffffffffffffffffffff16611a0884610881565b73ffffffffffffffffffffffffffffffffffffffff16145b80611a315750611a3081856114f5565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611a5a82610ef4565b73ffffffffffffffffffffffffffffffffffffffff1614611ab0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa79061302b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b179061308b565b60405180910390fd5b611b2b838383612163565b611b36600082611895565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611b86919061346a565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611bdd9190613389565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611c9c838383612168565b505050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60005b81811015611da257611d7c600761216d565b611d8f83611d8a600761194e565b612183565b8080611d9a906135b7565b915050611d6a565b505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611e16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e0d906130ab565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611f079190612fae565b60405180910390a3505050565b611f1f848484611a3a565b611f2b848484846121a1565b611f6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6190612feb565b60405180910390fd5b50505050565b606060088054611f7f90613554565b80601f0160208091040260200160405190810160405280929190818152602001828054611fab90613554565b8015611ff85780601f10611fcd57610100808354040283529160200191611ff8565b820191906000526020600020905b815481529060010190602001808311611fdb57829003601f168201915b5050505050905090565b6060600082141561204a576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061215e565b600082905060005b6000821461207c578080612065906135b7565b915050600a8261207591906133df565b9150612052565b60008167ffffffffffffffff811115612098576120976136ed565b5b6040519080825280601f01601f1916602001820160405280156120ca5781602001600182028036833780820191505090505b5090505b60008514612157576001826120e3919061346a565b9150600a856120f29190613600565b60306120fe9190613389565b60f81b818381518110612114576121136136be565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561215091906133df565b94506120ce565b8093505050505b919050565b505050565b505050565b6001816000016000828254019250508190555050565b61219d828260405180602001604052806000815250612338565b5050565b60006121c28473ffffffffffffffffffffffffffffffffffffffff16612393565b1561232b578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026121eb61188d565b8786866040518563ffffffff1660e01b815260040161220d9493929190612f40565b602060405180830381600087803b15801561222757600080fd5b505af192505050801561225857506040513d601f19601f82011682018060405250810190612255919061296c565b60015b6122db573d8060008114612288576040519150601f19603f3d011682016040523d82523d6000602084013e61228d565b606091505b506000815114156122d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ca90612feb565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612330565b600190505b949350505050565b61234283836123b6565b61234f60008484846121a1565b61238e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238590612feb565b60405180910390fd5b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612426576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161241d9061314b565b60405180910390fd5b61242f81611821565b1561246f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124669061304b565b60405180910390fd5b61247b60008383612163565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124cb9190613389565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461258c60008383612168565b5050565b82805461259c90613554565b90600052602060002090601f0160209004810192826125be5760008555612605565b82601f106125d757805160ff1916838001178555612605565b82800160010185558215612605579182015b828111156126045782518255916020019190600101906125e9565b5b5090506126129190612616565b5090565b5b8082111561262f576000816000905550600101612617565b5090565b60006126466126418461328b565b613266565b90508281526020810184848401111561266257612661613721565b5b61266d848285613512565b509392505050565b6000612688612683846132bc565b613266565b9050828152602081018484840111156126a4576126a3613721565b5b6126af848285613512565b509392505050565b6000813590506126c681613c17565b92915050565b6000813590506126db81613c2e565b92915050565b6000813590506126f081613c45565b92915050565b60008151905061270581613c45565b92915050565b600082601f8301126127205761271f61371c565b5b8135612730848260208601612633565b91505092915050565b600082601f83011261274e5761274d61371c565b5b813561275e848260208601612675565b91505092915050565b60008135905061277681613c5c565b92915050565b6000602082840312156127925761279161372b565b5b60006127a0848285016126b7565b91505092915050565b600080604083850312156127c0576127bf61372b565b5b60006127ce858286016126b7565b92505060206127df858286016126b7565b9150509250929050565b6000806000606084860312156128025761280161372b565b5b6000612810868287016126b7565b9350506020612821868287016126b7565b925050604061283286828701612767565b9150509250925092565b600080600080608085870312156128565761285561372b565b5b6000612864878288016126b7565b9450506020612875878288016126b7565b935050604061288687828801612767565b925050606085013567ffffffffffffffff8111156128a7576128a6613726565b5b6128b38782880161270b565b91505092959194509250565b600080604083850312156128d6576128d561372b565b5b60006128e4858286016126b7565b92505060206128f5858286016126cc565b9150509250929050565b600080604083850312156129165761291561372b565b5b6000612924858286016126b7565b925050602061293585828601612767565b9150509250929050565b6000602082840312156129555761295461372b565b5b6000612963848285016126e1565b91505092915050565b6000602082840312156129825761298161372b565b5b6000612990848285016126f6565b91505092915050565b6000602082840312156129af576129ae61372b565b5b600082013567ffffffffffffffff8111156129cd576129cc613726565b5b6129d984828501612739565b91505092915050565b6000602082840312156129f8576129f761372b565b5b6000612a0684828501612767565b91505092915050565b60008060408385031215612a2657612a2561372b565b5b6000612a3485828601612767565b9250506020612a45858286016126b7565b9150509250929050565b6000612a5b8383612ec1565b60208301905092915050565b612a708161349e565b82525050565b6000612a8182613312565b612a8b8185613340565b9350612a96836132ed565b8060005b83811015612ac7578151612aae8882612a4f565b9750612ab983613333565b925050600181019050612a9a565b5085935050505092915050565b612add816134b0565b82525050565b6000612aee8261331d565b612af88185613351565b9350612b08818560208601613521565b612b1181613730565b840191505092915050565b6000612b2782613328565b612b31818561336d565b9350612b41818560208601613521565b612b4a81613730565b840191505092915050565b6000612b6082613328565b612b6a818561337e565b9350612b7a818560208601613521565b80840191505092915050565b60008154612b9381613554565b612b9d818661337e565b94506001821660008114612bb85760018114612bc957612bfc565b60ff19831686528186019350612bfc565b612bd2856132fd565b60005b83811015612bf457815481890152600182019150602081019050612bd5565b838801955050505b50505092915050565b6000612c1260328361336d565b9150612c1d82613741565b604082019050919050565b6000612c3560268361336d565b9150612c4082613790565b604082019050919050565b6000612c5860258361336d565b9150612c63826137df565b604082019050919050565b6000612c7b601c8361336d565b9150612c868261382e565b602082019050919050565b6000612c9e60148361336d565b9150612ca982613857565b602082019050919050565b6000612cc160248361336d565b9150612ccc82613880565b604082019050919050565b6000612ce460198361336d565b9150612cef826138cf565b602082019050919050565b6000612d07602c8361336d565b9150612d12826138f8565b604082019050919050565b6000612d2a60388361336d565b9150612d3582613947565b604082019050919050565b6000612d4d602a8361336d565b9150612d5882613996565b604082019050919050565b6000612d7060298361336d565b9150612d7b826139e5565b604082019050919050565b6000612d9360208361336d565b9150612d9e82613a34565b602082019050919050565b6000612db6602c8361336d565b9150612dc182613a5d565b604082019050919050565b6000612dd960208361336d565b9150612de482613aac565b602082019050919050565b6000612dfc602f8361336d565b9150612e0782613ad5565b604082019050919050565b6000612e1f60218361336d565b9150612e2a82613b24565b604082019050919050565b6000612e42600083613362565b9150612e4d82613b73565b600082019050919050565b6000612e6560148361336d565b9150612e7082613b76565b602082019050919050565b6000612e8860318361336d565b9150612e9382613b9f565b604082019050919050565b6000612eab60138361336d565b9150612eb682613bee565b602082019050919050565b612eca81613508565b82525050565b612ed981613508565b82525050565b6000612eeb8286612b55565b9150612ef78285612b55565b9150612f038284612b86565b9150819050949350505050565b6000612f1b82612e35565b9150819050919050565b6000602082019050612f3a6000830184612a67565b92915050565b6000608082019050612f556000830187612a67565b612f626020830186612a67565b612f6f6040830185612ed0565b8181036060830152612f818184612ae3565b905095945050505050565b60006020820190508181036000830152612fa68184612a76565b905092915050565b6000602082019050612fc36000830184612ad4565b92915050565b60006020820190508181036000830152612fe38184612b1c565b905092915050565b6000602082019050818103600083015261300481612c05565b9050919050565b6000602082019050818103600083015261302481612c28565b9050919050565b6000602082019050818103600083015261304481612c4b565b9050919050565b6000602082019050818103600083015261306481612c6e565b9050919050565b6000602082019050818103600083015261308481612c91565b9050919050565b600060208201905081810360008301526130a481612cb4565b9050919050565b600060208201905081810360008301526130c481612cd7565b9050919050565b600060208201905081810360008301526130e481612cfa565b9050919050565b6000602082019050818103600083015261310481612d1d565b9050919050565b6000602082019050818103600083015261312481612d40565b9050919050565b6000602082019050818103600083015261314481612d63565b9050919050565b6000602082019050818103600083015261316481612d86565b9050919050565b6000602082019050818103600083015261318481612da9565b9050919050565b600060208201905081810360008301526131a481612dcc565b9050919050565b600060208201905081810360008301526131c481612def565b9050919050565b600060208201905081810360008301526131e481612e12565b9050919050565b6000602082019050818103600083015261320481612e58565b9050919050565b6000602082019050818103600083015261322481612e7b565b9050919050565b6000602082019050818103600083015261324481612e9e565b9050919050565b60006020820190506132606000830184612ed0565b92915050565b6000613270613281565b905061327c8282613586565b919050565b6000604051905090565b600067ffffffffffffffff8211156132a6576132a56136ed565b5b6132af82613730565b9050602081019050919050565b600067ffffffffffffffff8211156132d7576132d66136ed565b5b6132e082613730565b9050602081019050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061339482613508565b915061339f83613508565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156133d4576133d3613631565b5b828201905092915050565b60006133ea82613508565b91506133f583613508565b92508261340557613404613660565b5b828204905092915050565b600061341b82613508565b915061342683613508565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561345f5761345e613631565b5b828202905092915050565b600061347582613508565b915061348083613508565b92508282101561349357613492613631565b5b828203905092915050565b60006134a9826134e8565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561353f578082015181840152602081019050613524565b8381111561354e576000848401525b50505050565b6000600282049050600182168061356c57607f821691505b602082108114156135805761357f61368f565b5b50919050565b61358f82613730565b810181811067ffffffffffffffff821117156135ae576135ad6136ed565b5b80604052505050565b60006135c282613508565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156135f5576135f4613631565b5b600182019050919050565b600061360b82613508565b915061361683613508565b92508261362657613625613660565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f496e76616c6964206d696e7420616d6f756e7421000000000000000000000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b50565b7f4d617820737570706c7920657863656564656421000000000000000000000000600082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f496e73756666696369656e742066756e64732100000000000000000000000000600082015250565b613c208161349e565b8114613c2b57600080fd5b50565b613c37816134b0565b8114613c4257600080fd5b50565b613c4e816134bc565b8114613c5957600080fd5b50565b613c6581613508565b8114613c7057600080fd5b5056fea2646970667358221220828a774f058bb28a265924a4f2f9c320db8fd12ae36e44df8fdec29b87a0163664736f6c63430008070033
Verified Source Code Partial Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: No
DictHeads.sol 1279 lines
// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/utils/Counters.sol
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
// File: @openzeppelin/contracts/utils/Strings.sol
// OpenZeppelin Contracts v4.4.1 (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);
}
}
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (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;
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @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);
}
}
// File: @openzeppelin/contracts/utils/Address.sol
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @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);
}
}
}
}
// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol
// OpenZeppelin Contracts v4.4.1 (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);
}
// File: @openzeppelin/contracts/utils/introspection/IERC165.sol
// OpenZeppelin Contracts v4.4.1 (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);
}
// File: @openzeppelin/contracts/utils/introspection/ERC165.sol
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
/**
* @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;
}
}
// File: @openzeppelin/contracts/token/ERC721/IERC721.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
/**
* @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;
}
// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
/**
* @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/token/ERC721/ERC721.sol
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
/**
* @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 {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _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);
_afterTokenTransfer(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);
_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(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
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);
_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(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @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 {}
}
// File: DictHeads.sol
pragma solidity >=0.7.0 <0.9.0;
contract DictHeads is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public uriPrefix = "";
string public uriSuffix = ".json";
uint256 public cost = 3 ether;
uint256 public maxSupply = 160;
uint256 public maxMintAmountPerTx = 160;
constructor() ERC721("DictHeads", "DH") {}
modifier mintCompliance(uint256 _mintAmount) {
require(_mintAmount > 0 && _mintAmount <= maxMintAmountPerTx, "Invalid mint amount!");
require(supply.current() + _mintAmount <= maxSupply, "Max supply exceeded!");
_;
}
function totalSupply() public view returns (uint256) {
return supply.current();
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) {
require(msg.value >= cost * _mintAmount, "Insufficient funds!");
_mintLoop(msg.sender, _mintAmount);
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
_mintLoop(_receiver, _mintAmount);
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
uint256 ownerTokenCount = balanceOf(_owner);
uint256[] memory ownedTokenIds = new uint256[](ownerTokenCount);
uint256 currentTokenId = 1;
uint256 ownedTokenIndex = 0;
while (ownedTokenIndex < ownerTokenCount && currentTokenId <= maxSupply) {
address currentTokenOwner = ownerOf(currentTokenId);
if (currentTokenOwner == _owner) {
ownedTokenIds[ownedTokenIndex] = currentTokenId;
ownedTokenIndex++;
}
currentTokenId++;
}
return ownedTokenIds;
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
require(
_exists(_tokenId),
"ERC721Metadata: URI query for nonexistent token"
);
string memory currentBaseURI = _baseURI();
return bytes(currentBaseURI).length > 0
? string(abi.encodePacked(currentBaseURI, _tokenId.toString(), uriSuffix))
: "";
}
function setCost(uint256 _cost) public onlyOwner {
cost = _cost;
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
maxMintAmountPerTx = _maxMintAmountPerTx;
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
uriPrefix = _uriPrefix;
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
uriSuffix = _uriSuffix;
}
function withdraw() public onlyOwner {
(bool os, ) = payable(owner()).call{value: address(this).balance}("");
require(os);
}
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
for (uint256 i = 0; i < _mintAmount; i++) {
supply.increment();
_safeMint(_receiver, supply.current());
}
}
function _baseURI() internal view virtual override returns (string memory) {
return uriPrefix;
}
}
Read Contract
balanceOf 0x70a08231 → uint256
cost 0x13faede6 → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
maxMintAmountPerTx 0x94354fd0 → uint256
maxSupply 0xd5abeb01 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
uriPrefix 0x62b99ad4 → string
uriSuffix 0x5503a0e8 → string
walletOfOwner 0x438b6300 → uint256[]
Write Contract 14 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
mint 0xa0712d68
uint256 _mintAmount
mintForAddress 0xefbd73f4
uint256 _mintAmount
address _receiver
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
setCost 0x44a0d68a
uint256 _cost
setMaxMintAmountPerTx 0xb071401b
uint256 _maxMintAmountPerTx
setUriPrefix 0x7ec4a659
string _uriPrefix
setUriSuffix 0x16ba10e0
string _uriSuffix
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters
Recent Transactions
No transactions found for this address