Address Contract Verified
Address
0xB77F0b25aF126FCE0ea41e5696F1E5e9102E1D77
Balance
0 ETH
Nonce
1
Code Size
14206 bytes
Creator
0x8E9da8Ac...7DeC at tx 0x5d42af93...a40f76
Indexed Transactions
0
Contract Bytecode
14206 bytes
0x60806040526004361061011f5760003560e01c80636352211e116100a0578063b88d4fde11610064578063b88d4fde14610431578063c87b56dd1461045a578063d645ddf614610497578063d6912674146104b3578063e985e9c5146104f05761011f565b80636352211e1461032657806370a08231146103635780638e006a60146103a057806395d89b41146103dd578063a22cb465146104085761011f565b8063401476fc116100e7578063401476fc1461021b57806342842e0e146102585780634783c35b146102815780634e9730d1146102ac57806355e4ee3b146102e95761011f565b806301ffc9a71461012457806306fdde0314610161578063081812fc1461018c578063095ea7b3146101c957806323b872dd146101f2575b600080fd5b34801561013057600080fd5b5061014b600480360381019061014691906123e0565b61052d565b6040516101589190612f67565b60405180910390f35b34801561016d57600080fd5b5061017661060f565b6040516101839190612f9d565b60405180910390f35b34801561019857600080fd5b506101b360048036038101906101ae91906124c9565b6106a1565b6040516101c09190612ec3565b60405180910390f35b3480156101d557600080fd5b506101f060048036038101906101eb919061237b565b610726565b005b3480156101fe57600080fd5b5061021960048036038101906102149190612275565b61083e565b005b34801561022757600080fd5b50610242600480360381019061023d9190612432565b61089e565b60405161024f9190612f82565b60405180910390f35b34801561026457600080fd5b5061027f600480360381019061027a9190612275565b6108d4565b005b34801561028d57600080fd5b506102966108f4565b6040516102a39190612ede565b60405180910390f35b3480156102b857600080fd5b506102d360048036038101906102ce9190612432565b61091a565b6040516102e0919061328b565b60405180910390f35b3480156102f557600080fd5b50610310600480360381019061030b91906124c9565b610938565b60405161031d9190612f82565b60405180910390f35b34801561033257600080fd5b5061034d600480360381019061034891906124c9565b61099d565b60405161035a9190612ec3565b60405180910390f35b34801561036f57600080fd5b5061038a60048036038101906103859190612210565b610a4f565b604051610397919061328b565b60405180910390f35b3480156103ac57600080fd5b506103c760048036038101906103c291906123b7565b610b07565b6040516103d4919061328b565b60405180910390f35b3480156103e957600080fd5b506103f2610b7e565b6040516103ff9190612f9d565b60405180910390f35b34801561041457600080fd5b5061042f600480360381019061042a919061233f565b610c10565b005b34801561043d57600080fd5b50610458600480360381019061045391906122c4565b610d91565b005b34801561046657600080fd5b50610481600480360381019061047c91906124c9565b610df3565b60405161048e9190612f9d565b60405180910390f35b6104b160048036038101906104ac9190612432565b610e6c565b005b3480156104bf57600080fd5b506104da60048036038101906104d591906124c9565b611360565b6040516104e79190612f45565b60405180910390f35b3480156104fc57600080fd5b5061051760048036038101906105129190612239565b61144c565b6040516105249190612f67565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806105f857507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806106085750610607826114f6565b5b9050919050565b60606000805461061e9061355c565b80601f016020809104026020016040519081016040528092919081815260200182805461064a9061355c565b80156106975780601f1061066c57610100808354040283529160200191610697565b820191906000526020600020905b81548152906001019060200180831161067a57829003601f168201915b5050505050905090565b60006106ac82611560565b6106eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e29061318b565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006107318261099d565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107999061320b565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166107c16115cc565b73ffffffffffffffffffffffffffffffffffffffff1614806107f057506107ef816107ea6115cc565b61144c565b5b61082f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610826906130cb565b60405180910390fd5b61083983836115d4565b505050565b61084f6108496115cc565b8261168d565b61088e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108859061322b565b60405180910390fd5b61089983838361176b565b505050565b60008383836040516020016108b593929190612e50565b6040516020818303038152906040528051906020012090509392505050565b6108ef83838360405180602001604052806000815250610d91565b505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061092f61092a85858561089e565b610b07565b90509392505050565b600061094382611560565b610982576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610979906131ab565b60405180910390fd5b60126000838152602001908152602001600020549050919050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610a46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3d9061310b565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610ac0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab7906130eb565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000806011600084815260200190815260200160002054905060008114158015610b365750610b3581611560565b5b610b75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6c906131ab565b60405180910390fd5b80915050919050565b606060018054610b8d9061355c565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb99061355c565b8015610c065780601f10610bdb57610100808354040283529160200191610c06565b820191906000526020600020905b815481529060010190602001808311610be957829003601f168201915b5050505050905090565b610c186115cc565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7d9061306b565b60405180910390fd5b8060056000610c936115cc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16610d406115cc565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610d859190612f67565b60405180910390a35050565b610da2610d9c6115cc565b8361168d565b610de1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd89061322b565b60405180910390fd5b610ded848484846119c7565b50505050565b6060610dfe82611560565b610e3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e34906131eb565b60405180910390fd5b610e4682611a23565b604051602001610e569190612e81565b6040516020818303038152906040529050919050565b6010835111158015610e8057506010825111155b8015610e8e57506010815111155b610ecd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec49061316b565b60405180910390fd5b6000610ed76115cc565b90506000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480610f845750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80610fdc5750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b9050600d54341015611023576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101a9061324b565b60405180910390fd5b801561108157600c546110366010611bd0565b10611076576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106d9061308b565b60405180910390fd5b61108060106114e0565b5b6000600e54346110919190613456565b9050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600e546040516110db90612eae565b60006040518083038185875af1925050503d8060008114611118576040519150601f19603f3d011682016040523d82523d6000602084013e61111d565b606091505b505050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168160405161116690612eae565b60006040518083038185875af1925050503d80600081146111a3576040519150601f19603f3d011682016040523d82523d6000602084013e6111a8565b606091505b505050600b546111b86010611bd0565b600c5460016111c7600f611bd0565b6111d19190613456565b6111db91906133cf565b6111e59190613456565b10611225576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121c9061312b565b60405180910390fd5b600061123287878761089e565b9050600060116000838152602001908152602001600020541461128a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112819061326b565b60405180910390fd5b6000611296600f611bd0565b905080601160008481526020019081526020016000208190555081601260008381526020019081526020016000208190555060405180606001604052808981526020018881526020018781525060136000838152602001908152602001600020906003611304929190611f5b565b5061130f8582611bde565b611319600f6114e0565b80827f936cdba27d98e651b32851d1888258adb2fa8a237bc0ace0045b00d3cb397bad8a8a8a60405161134e93929190612fbf565b60405180910390a35050505050505050565b606060136000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156114415783829060005260206000200180546113b49061355c565b80601f01602080910402602001604051908101604052809291908181526020018280546113e09061355c565b801561142d5780601f106114025761010080835404028352916020019161142d565b820191906000526020600020905b81548152906001019060200180831161141057829003601f168201915b505050505081526020019060010190611395565b505050509050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6001816000016000828254019250508190555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166116478361099d565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061169882611560565b6116d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ce906130ab565b60405180910390fd5b60006116e28361099d565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061175157508373ffffffffffffffffffffffffffffffffffffffff16611739846106a1565b73ffffffffffffffffffffffffffffffffffffffff16145b806117625750611761818561144c565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661178b8261099d565b73ffffffffffffffffffffffffffffffffffffffff16146117e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d8906131cb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611851576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118489061304b565b60405180910390fd5b61185c838383611dac565b6118676000826115d4565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546118b79190613456565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461190e91906133cf565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6119d284848461176b565b6119de84848484611db1565b611a1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a149061300b565b60405180910390fd5b50505050565b60606000821415611a6b576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611bcb565b600082905060005b60008214611a9d578080611a869061358e565b915050600a82611a969190613425565b9150611a73565b60008167ffffffffffffffff811115611adf577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611b115781602001600182028036833780820191505090505b5090505b60008514611bc457600182611b2a9190613456565b9150600a85611b3991906135d7565b6030611b4591906133cf565b60f81b818381518110611b81577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85611bbd9190613425565b9450611b15565b8093505050505b919050565b600081600001549050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611c4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c459061314b565b60405180910390fd5b611c5781611560565b15611c97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c8e9061302b565b60405180910390fd5b611ca360008383611dac565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611cf391906133cf565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b505050565b6000611dd28473ffffffffffffffffffffffffffffffffffffffff16611f48565b15611f3b578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02611dfb6115cc565b8786866040518563ffffffff1660e01b8152600401611e1d9493929190612ef9565b602060405180830381600087803b158015611e3757600080fd5b505af1925050508015611e6857506040513d601f19601f82011682018060405250810190611e659190612409565b60015b611eeb573d8060008114611e98576040519150601f19603f3d011682016040523d82523d6000602084013e611e9d565b606091505b50600081511415611ee3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eda9061300b565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050611f40565b600190505b949350505050565b600080823b905060008111915050919050565b828054828255906000526020600020908101928215611faa579160200282015b82811115611fa9578251829080519060200190611f99929190611fbb565b5091602001919060010190611f7b565b5b509050611fb79190612041565b5090565b828054611fc79061355c565b90600052602060002090601f016020900481019282611fe95760008555612030565b82601f1061200257805160ff1916838001178555612030565b82800160010185558215612030579182015b8281111561202f578251825591602001919060010190612014565b5b50905061203d9190612065565b5090565b5b8082111561206157600081816120589190612082565b50600101612042565b5090565b5b8082111561207e576000816000905550600101612066565b5090565b50805461208e9061355c565b6000825580601f106120a057506120bf565b601f0160209004906000526020600020908101906120be9190612065565b5b50565b60006120d56120d0846132d7565b6132a6565b9050828152602081018484840111156120ed57600080fd5b6120f884828561351a565b509392505050565b600061211361210e84613307565b6132a6565b90508281526020810184848401111561212b57600080fd5b61213684828561351a565b509392505050565b60008135905061214d816136d5565b92915050565b600081359050612162816136ec565b92915050565b60008135905061217781613703565b92915050565b60008135905061218c8161371a565b92915050565b6000815190506121a18161371a565b92915050565b600082601f8301126121b857600080fd5b81356121c88482602086016120c2565b91505092915050565b600082601f8301126121e257600080fd5b81356121f2848260208601612100565b91505092915050565b60008135905061220a81613731565b92915050565b60006020828403121561222257600080fd5b60006122308482850161213e565b91505092915050565b6000806040838503121561224c57600080fd5b600061225a8582860161213e565b925050602061226b8582860161213e565b9150509250929050565b60008060006060848603121561228a57600080fd5b60006122988682870161213e565b93505060206122a98682870161213e565b92505060406122ba868287016121fb565b9150509250925092565b600080600080608085870312156122da57600080fd5b60006122e88782880161213e565b94505060206122f98782880161213e565b935050604061230a878288016121fb565b925050606085013567ffffffffffffffff81111561232757600080fd5b612333878288016121a7565b91505092959194509250565b6000806040838503121561235257600080fd5b60006123608582860161213e565b925050602061237185828601612153565b9150509250929050565b6000806040838503121561238e57600080fd5b600061239c8582860161213e565b92505060206123ad858286016121fb565b9150509250929050565b6000602082840312156123c957600080fd5b60006123d784828501612168565b91505092915050565b6000602082840312156123f257600080fd5b60006124008482850161217d565b91505092915050565b60006020828403121561241b57600080fd5b600061242984828501612192565b91505092915050565b60008060006060848603121561244757600080fd5b600084013567ffffffffffffffff81111561246157600080fd5b61246d868287016121d1565b935050602084013567ffffffffffffffff81111561248a57600080fd5b612496868287016121d1565b925050604084013567ffffffffffffffff8111156124b357600080fd5b6124bf868287016121d1565b9150509250925092565b6000602082840312156124db57600080fd5b60006124e9848285016121fb565b91505092915050565b60006124fe83836125f0565b905092915050565b61250f8161349c565b82525050565b61251e8161348a565b82525050565b600061252f82613347565b6125398185613375565b93508360208202850161254b85613337565b8060005b85811015612587578484038952815161256885826124f2565b945061257383613368565b925060208a0199505060018101905061254f565b50829750879550505050505092915050565b6125a2816134ae565b82525050565b6125b1816134ba565b82525050565b60006125c282613352565b6125cc8185613386565b93506125dc818560208601613529565b6125e5816136c4565b840191505092915050565b60006125fb8261335d565b61260581856133a2565b9350612615818560208601613529565b61261e816136c4565b840191505092915050565b60006126348261335d565b61263e81856133b3565b935061264e818560208601613529565b612657816136c4565b840191505092915050565b600061266d8261335d565b61267781856133c4565b9350612687818560208601613529565b80840191505092915050565b60006126a06023836133c4565b91507f68747470733a2f2f33776f72647370726f6a6563742e636f6d2f6d657461646160008301527f74612f00000000000000000000000000000000000000000000000000000000006020830152602382019050919050565b60006127066032836133b3565b91507f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008301527f63656976657220696d706c656d656e74657200000000000000000000000000006020830152604082019050919050565b600061276c601c836133b3565b91507f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006000830152602082019050919050565b60006127ac6024836133b3565b91507f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006128126019836133b3565b91507f4552433732313a20617070726f766520746f2063616c6c6572000000000000006000830152602082019050919050565b6000612852602d836133b3565b91507f6d756c74697369672063616e6e6f74206d696e74206d6f7265207468616e207260008301527f65736572766520616d6f756e74000000000000000000000000000000000000006020830152604082019050919050565b60006128b8602c836133b3565b91507f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008301527f697374656e7420746f6b656e00000000000000000000000000000000000000006020830152604082019050919050565b600061291e6038836133b3565b91507f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008301527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006020830152604082019050919050565b6000612984602a836133b3565b91507f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008301527f726f2061646472657373000000000000000000000000000000000000000000006020830152604082019050919050565b60006129ea6029836133b3565b91507f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008301527f656e7420746f6b656e00000000000000000000000000000000000000000000006020830152604082019050919050565b6000612a506012836133b3565b91507f6d617820737570706c79207265616368656400000000000000000000000000006000830152602082019050919050565b6000612a906020836133b3565b91507f4552433732313a206d696e7420746f20746865207a65726f20616464726573736000830152602082019050919050565b6000612ad06020836133b3565b91507f776f726473206d757374206265206c657373207468616e2031362062797465736000830152602082019050919050565b6000612b10602c836133b3565b91507f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008301527f697374656e7420746f6b656e00000000000000000000000000000000000000006020830152604082019050919050565b6000612b766005836133c4565b91507f2e6a736f6e0000000000000000000000000000000000000000000000000000006000830152600582019050919050565b6000612bb66037836133b3565b91507f4552433732314d657461646174613a20746f6b656e506872617365207175657260008301527f7920666f72206e6f6e6578697374656e7420746f6b656e0000000000000000006020830152604082019050919050565b6000612c1c6029836133b3565b91507f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008301527f73206e6f74206f776e00000000000000000000000000000000000000000000006020830152604082019050919050565b6000612c82602f836133b3565b91507f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008301527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006020830152604082019050919050565b6000612ce86021836133b3565b91507f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008301527f72000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612d4e600083613397565b9150600082019050919050565b6000612d686031836133b3565b91507f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008301527f776e6572206e6f7220617070726f7665640000000000000000000000000000006020830152604082019050919050565b6000612dce6011836133b3565b91507f6d75737420706179206d696e74206665650000000000000000000000000000006000830152602082019050919050565b6000612e0e6015836133b3565b91507f70687261736520616c7265616479206d696e74656400000000000000000000006000830152602082019050919050565b612e4a81613510565b82525050565b6000612e5c8286612662565b9150612e688285612662565b9150612e748284612662565b9150819050949350505050565b6000612e8c82612693565b9150612e988284612662565b9150612ea382612b69565b915081905092915050565b6000612eb982612d41565b9150819050919050565b6000602082019050612ed86000830184612515565b92915050565b6000602082019050612ef36000830184612506565b92915050565b6000608082019050612f0e6000830187612515565b612f1b6020830186612515565b612f286040830185612e41565b8181036060830152612f3a81846125b7565b905095945050505050565b60006020820190508181036000830152612f5f8184612524565b905092915050565b6000602082019050612f7c6000830184612599565b92915050565b6000602082019050612f9760008301846125a8565b92915050565b60006020820190508181036000830152612fb78184612629565b905092915050565b60006060820190508181036000830152612fd98186612629565b90508181036020830152612fed8185612629565b905081810360408301526130018184612629565b9050949350505050565b60006020820190508181036000830152613024816126f9565b9050919050565b600060208201905081810360008301526130448161275f565b9050919050565b600060208201905081810360008301526130648161279f565b9050919050565b6000602082019050818103600083015261308481612805565b9050919050565b600060208201905081810360008301526130a481612845565b9050919050565b600060208201905081810360008301526130c4816128ab565b9050919050565b600060208201905081810360008301526130e481612911565b9050919050565b6000602082019050818103600083015261310481612977565b9050919050565b60006020820190508181036000830152613124816129dd565b9050919050565b6000602082019050818103600083015261314481612a43565b9050919050565b6000602082019050818103600083015261316481612a83565b9050919050565b6000602082019050818103600083015261318481612ac3565b9050919050565b600060208201905081810360008301526131a481612b03565b9050919050565b600060208201905081810360008301526131c481612ba9565b9050919050565b600060208201905081810360008301526131e481612c0f565b9050919050565b6000602082019050818103600083015261320481612c75565b9050919050565b6000602082019050818103600083015261322481612cdb565b9050919050565b6000602082019050818103600083015261324481612d5b565b9050919050565b6000602082019050818103600083015261326481612dc1565b9050919050565b6000602082019050818103600083015261328481612e01565b9050919050565b60006020820190506132a06000830184612e41565b92915050565b6000604051905081810181811067ffffffffffffffff821117156132cd576132cc613695565b5b8060405250919050565b600067ffffffffffffffff8211156132f2576132f1613695565b5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff82111561332257613321613695565b5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006133da82613510565b91506133e583613510565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561341a57613419613608565b5b828201905092915050565b600061343082613510565b915061343b83613510565b92508261344b5761344a613637565b5b828204905092915050565b600061346182613510565b915061346c83613510565b92508282101561347f5761347e613608565b5b828203905092915050565b6000613495826134f0565b9050919050565b60006134a7826134f0565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561354757808201518184015260208101905061352c565b83811115613556576000848401525b50505050565b6000600282049050600182168061357457607f821691505b6020821081141561358857613587613666565b5b50919050565b600061359982613510565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156135cc576135cb613608565b5b600182019050919050565b60006135e282613510565b91506135ed83613510565b9250826135fd576135fc613637565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6136de8161348a565b81146136e957600080fd5b50565b6136f5816134ae565b811461370057600080fd5b50565b61370c816134ba565b811461371757600080fd5b50565b613723816134c4565b811461372e57600080fd5b50565b61373a81613510565b811461374557600080fd5b5056fea2646970667358221220b4a2036039fd1c32833b151b0a248c40456a37502e67b77a321bcac95856e9ce64736f6c63430008000033
Verified Source Code Full Match
Compiler: v0.8.0+commit.c7dfd78e
EVM: istanbul
Optimization: No
ThreeWords.sol 117 lines
/*
______ __ __ __ ______ ______ ______ ______
/_____/\ /_//_//_/\ /_____/\ /_____/\ /_____/\ /_____/\
\:::_:\ \ \:\\:\\:\ \\:::_ \ \\:::_ \ \ \:::_ \ \\::::_\/_
/_\:\ \ \:\\:\\:\ \\:\ \ \ \\:(_) ) )_\:\ \ \ \\:\/___/\
\::_:\ \ \:\\:\\:\ \\:\ \ \ \\: __ `\ \\:\ \ \ \\_::._\:\
/___\:\ ' \:\\:\\:\ \\:\_\ \ \\ \ `\ \ \\:\/.:| | /____\:\
\______/ \_______\/ \_____\/ \_\/ \_\/ \____/_/ \_____\/
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract ThreeWords is
Context,
ERC721
{
event Mint(
bytes32 indexed phraseId,
uint256 indexed tokenId,
string word1,
string word2,
string word3
);
address payable public multisig;
address payable DRIBNET = payable(0x370433a205B84839B507420B8E22900BAb902a8b);
address dev1 = 0x8E9da8Ac8643D24Fb19B70Afe563fdE2eC7A7DeC;
address dev2 = 0xEf3c42eB484aE448CBbE4391D3CC4E16AAaB0d24;
address dev3 = 0x01f81279Fec131a3E2fa7a61C429cf953d8f3f83;
uint MAX_SUPPLY = 333;
uint DEV_RESERVED = 33;
uint256 PRICE = 333 * 10**15; // 0.333 ETH
uint256 ROYALTY_PRICE = 999 * 10**13; // 3% of PRICE
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
Counters.Counter private _devReserveTracker;
mapping(bytes32 => uint256) private _phraseIdToTokenId;
mapping(uint256 => bytes32) private _tokenIdToPhraseId;
mapping(uint256 => string[]) private _tokenIdToWords;
constructor(
string memory name,
string memory symbol,
address payable _multisig
) ERC721(name, symbol) {
multisig = _multisig;
_tokenIdTracker.increment(); // start tokenIds from 1
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
return string(abi.encodePacked("https://3wordsproject.com/metadata/", Strings.toString(tokenId), ".json"));
}
function tokenIdToPhraseId(uint256 tokenId) public view returns (bytes32) {
require(_exists(tokenId), "ERC721Metadata: tokenPhrase query for nonexistent token");
return _tokenIdToPhraseId[tokenId];
}
function wordsToTokenId(string memory _word1, string memory _word2, string memory _word3) public view returns (uint256) {
return phraseIdToTokenId(wordsToPhraseId(_word1, _word2, _word3));
}
function wordsToPhraseId(string memory _word1, string memory _word2, string memory _word3) public view returns (bytes32) {
return keccak256(abi.encodePacked(_word1, _word2, _word3));
}
function phraseIdToTokenId(bytes32 phraseId) public view returns (uint256) {
uint256 tokenId = _phraseIdToTokenId[phraseId];
require(tokenId != 0 && _exists(tokenId), "ERC721Metadata: tokenPhrase query for nonexistent token");
return tokenId;
}
function tokenIdToWords(uint256 tokenId) public view returns (string[] memory) {
return _tokenIdToWords[tokenId];
}
function mint(string memory _word1, string memory _word2, string memory _word3)
public
payable
{
require (bytes(_word1).length <= 16 && bytes(_word2).length <= 16 && bytes(_word3).length <= 16, "words must be less than 16 bytes");
address receiver = _msgSender();
bool receiverIsDev = (receiver == dev1 || receiver == dev2 || receiver == dev3);
require (msg.value >= PRICE, "must pay mint fee");
if (receiverIsDev) {
require (_devReserveTracker.current() < DEV_RESERVED, "multisig cannot mint more than reserve amount");
_devReserveTracker.increment();
}
uint256 multisigFee = msg.value - ROYALTY_PRICE;
DRIBNET.call{value: ROYALTY_PRICE}("");
multisig.call{value: multisigFee}("");
require(_tokenIdTracker.current() - 1 + DEV_RESERVED - _devReserveTracker.current() < MAX_SUPPLY, "max supply reached"); // - 1 because tokenIdTracker.current starts at 1
bytes32 phraseId = wordsToPhraseId(_word1, _word2, _word3);
require(_phraseIdToTokenId[phraseId] == 0, "phrase already minted"); // this is why we start tokenid at 1
uint256 tokenId = _tokenIdTracker.current();
_phraseIdToTokenId[phraseId] = tokenId;
_tokenIdToPhraseId[tokenId] = phraseId;
_tokenIdToWords[tokenId] = [_word1, _word2, _word3];
_mint(receiver, tokenId);
_tokenIdTracker.increment();
emit Mint(phraseId, tokenId, _word1, _word2, _word3);
}
}
Address.sol 216 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
Context.sol 23 lines
// SPDX-License-Identifier: MIT
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;
}
}
Strings.sol 66 lines
// SPDX-License-Identifier: MIT
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);
}
}
Counters.sol 42 lines
// SPDX-License-Identifier: MIT
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;
}
}
ERC721.sol 411 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
IERC721.sol 142 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
ERC165.sol 28 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
IERC165.sol 24 lines
// SPDX-License-Identifier: MIT
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);
}
IERC721Receiver.sol 26 lines
// SPDX-License-Identifier: MIT
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);
}
IERC721Metadata.sol 26 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
Read Contract
balanceOf 0x70a08231 → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
multisig 0x4783c35b → address
name 0x06fdde03 → string
ownerOf 0x6352211e → address
phraseIdToTokenId 0x8e006a60 → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenIdToPhraseId 0x55e4ee3b → bytes32
tokenIdToWords 0xd6912674 → string[]
tokenURI 0xc87b56dd → string
wordsToPhraseId 0x401476fc → bytes32
wordsToTokenId 0x4e9730d1 → uint256
Write Contract 6 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
mint 0xd645ddf6
string _word1
string _word2
string _word3
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
Recent Transactions
No transactions found for this address