commit 0bc887f9340fda2c178da00c3a4452a5899b83d6
parent 1527b8fd884a48f5f1785328c193e3a540402e30
Author: lash <dev@holbrook.no>
Date: Sun, 26 Mar 2023 09:01:01 +0100
Replace createdAt with ERC5007
Diffstat:
9 files changed, 87 insertions(+), 48 deletions(-)
diff --git a/python/eth_badgetoken/data/BadgeToken.bin b/python/eth_badgetoken/data/BadgeToken.bin
@@ -1 +1 @@
-60806040523480156200001157600080fd5b506040516200302b3803806200302b833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600b90816200008891906200050c565b5080600c90816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612a2880620006036000396000f3fe608060405260043610610152576000357c0100000000000000000000000000000000000000000000000000000000900480636352211e116100c8578063b88d4fde1161008c578063b88d4fde14610468578063c793c6c114610484578063c87b56dd146104c1578063c9796c39146104fe578063e985e9c51461053b578063f2fde38b1461057857610152565b80636352211e1461036f57806370a08231146103ac5780638da5cb5b146103e957806395d89b4114610414578063a22cb4651461043f57610152565b806323b872dd1161011a57806323b872dd146102435780632f745c591461025f57806342842e0e1461029c578063449a52f8146102b85780634f6ccce7146102f557806350a1676e1461033257610152565b806301ffc9a71461015757806306fdde0314610194578063081812fc146101bf578063095ea7b3146101fc57806318160ddd14610218575b600080fd5b34801561016357600080fd5b5061017e600480360381019061017991906121de565b6105b5565b60405161018b9190612226565b60405180910390f35b3480156101a057600080fd5b506101a961075b565b6040516101b691906122d1565b60405180910390f35b3480156101cb57600080fd5b506101e660048036038101906101e19190612329565b6107e9565b6040516101f39190612397565b60405180910390f35b610216600480360381019061021191906123de565b610826565b005b34801561022457600080fd5b5061022d610942565b60405161023a919061242d565b60405180910390f35b61025d60048036038101906102589190612448565b61094f565b005b34801561026b57600080fd5b50610286600480360381019061028191906123de565b6109be565b604051610293919061242d565b60405180910390f35b6102b660048036038101906102b19190612448565b610a6f565b005b3480156102c457600080fd5b506102df60048036038101906102da91906123de565b610ade565b6040516102ec9190612226565b60405180910390f35b34801561030157600080fd5b5061031c60048036038101906103179190612329565b610db8565b604051610329919061242d565b60405180910390f35b34801561033e57600080fd5b5061035960048036038101906103549190612329565b610de0565b604051610366919061242d565b60405180910390f35b34801561037b57600080fd5b5061039660048036038101906103919190612329565b610e20565b6040516103a39190612397565b60405180910390f35b3480156103b857600080fd5b506103d360048036038101906103ce919061249b565b610e5d565b6040516103e0919061242d565b60405180910390f35b3480156103f557600080fd5b506103fe610ea6565b60405161040b9190612397565b60405180910390f35b34801561042057600080fd5b50610429610eca565b60405161043691906122d1565b60405180910390f35b34801561044b57600080fd5b50610466600480360381019061046191906124f4565b610f58565b005b610482600480360381019061047d9190612669565b6111fa565b005b34801561049057600080fd5b506104ab60048036038101906104a6919061249b565b61131e565b6040516104b8919061242d565b60405180910390f35b3480156104cd57600080fd5b506104e860048036038101906104e39190612329565b611336565b6040516104f591906122d1565b60405180910390f35b34801561050a57600080fd5b5061052560048036038101906105209190612722565b61137c565b60405161053291906122d1565b60405180910390f35b34801561054757600080fd5b50610562600480360381019061055d919061274f565b611997565b60405161056f9190612226565b60405180910390f35b34801561058457600080fd5b5061059f600480360381019061059a919061249b565b611a2f565b6040516105ac9190612226565b60405180910390f35b600063c22876c37c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106095760019050610756565b63d283ef1d7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361065b5760019050610756565b63dd9d20877c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106ad5760019050610756565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106ff5760019050610756565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107515760019050610756565b600090505b919050565b600b8054610768906127be565b80601f0160208091040260200160405190810160405280929190818152602001828054610794906127be565b80156107e15780601f106107b6576101008083540402835291602001916107e1565b820191906000526020600020905b8154815290600101906020018083116107c457829003601f168201915b505050505081565b60006008600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b3373ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461089157600080fd5b816008600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000600180549050905090565b606061095d84848484611be5565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548210610a0b57600080fd5b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110610a5c57610a5b6127ef565b5b9060005260206000200154905092915050565b6060610a7d84848484611be5565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60003373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b3857600080fd5b600060036000848152602001908152602001600020541480610b5f57506000600180549050145b610b6857600080fd5b600080600180549050915083905060018190806001815401808255809150506001900390600052602060002001600090919091909150558160036000838152602001908152602001600020819055506002439080600181540180825580915050600190039060005260206000200160009091909190915055846004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360066000600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050815260200190815260200160002081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020849080600181540180825580915050600190039060005260206000200160009091909190915055600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190610d429061284d565b91905055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f886604051610da4919061242d565b60405180910390a360019250505092915050565b600060018281548110610dce57610dcd6127ef565b5b90600052602060002001549050919050565b6000806003600084815260200190815260200160002054905060028181548110610e0d57610e0c6127ef565b5b9060005260206000200154915050919050565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c8054610ed7906127be565b80601f0160208091040260200160405190810160405280929190818152602001828054610f03906127be565b8015610f505780601f10610f2557610100808354040283529160200191610f50565b820191906000526020600020905b815481529060010190602001808311610f3357829003601f168201915b505050505081565b801561107957600073ffffffffffffffffffffffffffffffffffffffff16600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ff657600080fd5b81600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611191565b600073ffffffffffffffffffffffffffffffffffffffff16600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff160361111157600080fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516111ee9190612226565b60405180910390a35050565b61120684848484611be5565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600a60008781526020019081526020016000206001600a6000898152602001908152602001600020805490506112e79190612895565b815481106112f8576112f76127ef565b5b906000526020600020015460405161131091906128d8565b60405180910390a450505050565b60076020528060005260406000206000915090505481565b60606113756001600360008581526020019081526020016000205481548110611362576113616127ef565b5b906000526020600020015460010261137c565b9050919050565b606080600080604767ffffffffffffffff81111561139d5761139c61253e565b5b6040519080825280601f01601f1916602001820160405280156113cf5781602001600182028036833780820191505090505b5092507f730000000000000000000000000000000000000000000000000000000000000083600081518110611407576114066127ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f68000000000000000000000000000000000000000000000000000000000000008360018151811061146b5761146a6127ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6100000000000000000000000000000000000000000000000000000000000000836002815181106114cf576114ce6127ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f320000000000000000000000000000000000000000000000000000000000000083600381518110611533576115326127ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f350000000000000000000000000000000000000000000000000000000000000083600481518110611597576115966127ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3600000000000000000000000000000000000000000000000000000000000000836005815181106115fb576115fa6127ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a000000000000000000000000000000000000000000000000000000000000008360068151811061165f5761165e6127ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b602081101561198b57600460f08783602081106116b5576116b46127ef565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff16101561178d576030836117249190612900565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611759576117586127ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506117ff565b60578361179a9190612900565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106117cf576117ce6127ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611814576118136127ef565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff1610156118eb576030836118769190612900565b7f010000000000000000000000000000000000000000000000000000000000000002846001846118a69190612935565b815181106118b7576118b66127ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611969565b6057836118f89190612900565b7f010000000000000000000000000000000000000000000000000000000000000002846001846119289190612935565b81518110611939576119386127ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b6002826119769190612935565b915080806119839061284d565b915050611695565b50829350505050919050565b60008173ffffffffffffffffffffffffffffffffffffffff16600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a8a57600080fd5b606060008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060005b8180549050811015611b3e57611b2b8387848481548110611b1a57611b196127ef565b5b906000526020600020015487611be5565b8080611b369061284d565b915050611af6565b50846000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360019350505050919050565b60006004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508473ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c8857600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611dbc573373ffffffffffffffffffffffffffffffffffffffff166008600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480611db257503373ffffffffffffffffffffffffffffffffffffffff16600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b611dbb57600080fd5b5b60006008600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050611e9d9190612895565b81548110611eae57611ead6127ef565b5b9060005260206000200154600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600660008681526020019081526020016000205481548110611f1d57611f1c6127ef565b5b9060005260206000200181905550600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611f7b90612969565b9190505550600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020839080600181540180825580915050600190039060005260206000200160009091909190915055600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906120369061284d565b9190505550836004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060005b825181101561216a578281815181106120ac576120ab6127ef565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916600a600086815260200190815260200160002060208361213891906129c1565b81548110612149576121486127ef565b5b906000526020600020018190555080806121629061284d565b915050612090565b505050505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6121bb81612186565b81146121c657600080fd5b50565b6000813590506121d8816121b2565b92915050565b6000602082840312156121f4576121f361217c565b5b6000612202848285016121c9565b91505092915050565b60008115159050919050565b6122208161220b565b82525050565b600060208201905061223b6000830184612217565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561227b578082015181840152602081019050612260565b60008484015250505050565b6000601f19601f8301169050919050565b60006122a382612241565b6122ad818561224c565b93506122bd81856020860161225d565b6122c681612287565b840191505092915050565b600060208201905081810360008301526122eb8184612298565b905092915050565b6000819050919050565b612306816122f3565b811461231157600080fd5b50565b600081359050612323816122fd565b92915050565b60006020828403121561233f5761233e61217c565b5b600061234d84828501612314565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061238182612356565b9050919050565b61239181612376565b82525050565b60006020820190506123ac6000830184612388565b92915050565b6123bb81612376565b81146123c657600080fd5b50565b6000813590506123d8816123b2565b92915050565b600080604083850312156123f5576123f461217c565b5b6000612403858286016123c9565b925050602061241485828601612314565b9150509250929050565b612427816122f3565b82525050565b6000602082019050612442600083018461241e565b92915050565b6000806000606084860312156124615761246061217c565b5b600061246f868287016123c9565b9350506020612480868287016123c9565b925050604061249186828701612314565b9150509250925092565b6000602082840312156124b1576124b061217c565b5b60006124bf848285016123c9565b91505092915050565b6124d18161220b565b81146124dc57600080fd5b50565b6000813590506124ee816124c8565b92915050565b6000806040838503121561250b5761250a61217c565b5b6000612519858286016123c9565b925050602061252a858286016124df565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61257682612287565b810181811067ffffffffffffffff821117156125955761259461253e565b5b80604052505050565b60006125a8612172565b90506125b4828261256d565b919050565b600067ffffffffffffffff8211156125d4576125d361253e565b5b6125dd82612287565b9050602081019050919050565b82818337600083830152505050565b600061260c612607846125b9565b61259e565b90508281526020810184848401111561262857612627612539565b5b6126338482856125ea565b509392505050565b600082601f8301126126505761264f612534565b5b81356126608482602086016125f9565b91505092915050565b600080600080608085870312156126835761268261217c565b5b6000612691878288016123c9565b94505060206126a2878288016123c9565b93505060406126b387828801612314565b925050606085013567ffffffffffffffff8111156126d4576126d3612181565b5b6126e08782880161263b565b91505092959194509250565b6000819050919050565b6126ff816126ec565b811461270a57600080fd5b50565b60008135905061271c816126f6565b92915050565b6000602082840312156127385761273761217c565b5b60006127468482850161270d565b91505092915050565b600080604083850312156127665761276561217c565b5b6000612774858286016123c9565b9250506020612785858286016123c9565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806127d657607f821691505b6020821081036127e9576127e861278f565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612858826122f3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361288a5761288961281e565b5b600182019050919050565b60006128a0826122f3565b91506128ab836122f3565b92508282039050818111156128c3576128c261281e565b5b92915050565b6128d2816126ec565b82525050565b60006020820190506128ed60008301846128c9565b92915050565b600060ff82169050919050565b600061290b826128f3565b9150612916836128f3565b9250828201905060ff81111561292f5761292e61281e565b5b92915050565b6000612940826122f3565b915061294b836122f3565b92508282019050808211156129635761296261281e565b5b92915050565b6000612974826122f3565b9150600082036129875761298661281e565b5b600182039050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006129cc826122f3565b91506129d7836122f3565b9250826129e7576129e6612992565b5b82820690509291505056fea264697066735822122068d2adbd8b8bf35aef329cb804cbfc33f3ac3c8ea8dc9482f229473aae408c1164736f6c63430008120033
-\ No newline at end of file
+60806040523480156200001157600080fd5b506040516200348638038062003486833981810160405281019062000037919062000236565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600b90816200008891906200050c565b5080600c90816200009a91906200050c565b505050620005f3565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200010c82620000c1565b810181811067ffffffffffffffff821117156200012e576200012d620000d2565b5b80604052505050565b600062000143620000a3565b905062000151828262000101565b919050565b600067ffffffffffffffff821115620001745762000173620000d2565b5b6200017f82620000c1565b9050602081019050919050565b60005b83811015620001ac5780820151818401526020810190506200018f565b60008484015250505050565b6000620001cf620001c98462000156565b62000137565b905082815260208101848484011115620001ee57620001ed620000bc565b5b620001fb8482856200018c565b509392505050565b600082601f8301126200021b576200021a620000b7565b5b81516200022d848260208601620001b8565b91505092915050565b6000806040838503121562000250576200024f620000ad565b5b600083015167ffffffffffffffff811115620002715762000270620000b2565b5b6200027f8582860162000203565b925050602083015167ffffffffffffffff811115620002a357620002a2620000b2565b5b620002b18582860162000203565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200030e57607f821691505b602082108103620003245762000323620002c6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620003917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200034f565b6200039d86836200034f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ea620003e4620003de84620003b5565b620003bf565b620003b5565b9050919050565b6000819050919050565b6200040683620003c9565b6200041e6200041582620003f1565b8484546200035f565b825550505050565b600090565b6200043562000426565b62000442818484620003fb565b505050565b5b818110156200046a576200045e6000826200042b565b60018101905062000448565b5050565b601f821115620004b95762000483816200032a565b6200048e846200033f565b810160208510156200049e578190505b620004b6620004ad856200033f565b83018262000447565b50505b505050565b60008160020a8304905092915050565b6000620004e160001984600802620004be565b1980831691505092915050565b6000620004fc8383620004ce565b9150826002028217905092915050565b6200051782620002bb565b67ffffffffffffffff811115620005335762000532620000d2565b5b6200053f8254620002f5565b6200054c8282856200046e565b600060209050601f8311600181146200058457600084156200056f578287015190505b6200057b8582620004ee565b865550620005eb565b601f19841662000594866200032a565b60005b82811015620005be5784890151825560018201915060208501945060208101905062000597565b86831015620005de5784890151620005da601f891682620004ce565b8355505b6001600288020188555050505b505050505050565b612e8380620006036000396000f3fe608060405260043610610168576000357c0100000000000000000000000000000000000000000000000000000000900480634f6ccce7116100d3578063a22cb4651161008c578063a22cb465146104e6578063b88d4fde1461050f578063c87b56dd1461052b578063c9796c3914610568578063e985e9c5146105a5578063f2fde38b146105e257610168565b80634f6ccce7146103b05780636352211e146103ed57806370a082311461042a5780638832e6e3146104675780638da5cb5b1461049057806395d89b41146104bb57610168565b80632e1a7d4d116101255780632e1a7d4d146102755780632f745c59146102b25780633197cbb6146102ef5780633ec4c9681461031a57806342842e0e14610357578063449a52f81461037357610168565b806301ffc9a71461016d57806306fdde03146101aa578063081812fc146101d5578063095ea7b31461021257806318160ddd1461022e57806323b872dd14610259575b600080fd5b34801561017957600080fd5b50610194600480360381019061018f91906124c2565b61061f565b6040516101a1919061250a565b60405180910390f35b3480156101b657600080fd5b506101bf610869565b6040516101cc91906125b5565b60405180910390f35b3480156101e157600080fd5b506101fc60048036038101906101f7919061260d565b6108f7565b604051610209919061267b565b60405180910390f35b61022c600480360381019061022791906126c2565b610934565b005b34801561023a57600080fd5b50610243610a50565b6040516102509190612711565b60405180910390f35b610273600480360381019061026e919061272c565b610a5d565b005b34801561028157600080fd5b5061029c6004803603810190610297919061260d565b610b1c565b6040516102a9919061250a565b60405180910390f35b3480156102be57600080fd5b506102d960048036038101906102d491906126c2565b610bfd565b6040516102e69190612711565b60405180910390f35b3480156102fb57600080fd5b50610304610cae565b604051610311919061279b565b60405180910390f35b34801561032657600080fd5b50610341600480360381019061033c919061260d565b610cba565b60405161034e9190612711565b60405180910390f35b610371600480360381019061036c919061272c565b610cfa565b005b34801561037f57600080fd5b5061039a600480360381019061039591906126c2565b610db9565b6040516103a7919061250a565b60405180910390f35b3480156103bc57600080fd5b506103d760048036038101906103d2919061260d565b611093565b6040516103e49190612711565b60405180910390f35b3480156103f957600080fd5b50610414600480360381019061040f919061260d565b6110bb565b604051610421919061267b565b60405180910390f35b34801561043657600080fd5b50610451600480360381019061044c91906127b6565b6110f8565b60405161045e9190612711565b60405180910390f35b34801561047357600080fd5b5061048e60048036038101906104899190612848565b611141565b005b34801561049c57600080fd5b506104a5611152565b6040516104b2919061267b565b60405180910390f35b3480156104c757600080fd5b506104d0611176565b6040516104dd91906125b5565b60405180910390f35b3480156104f257600080fd5b5061050d600480360381019061050891906128e8565b611204565b005b61052960048036038101906105249190612a58565b6114a6565b005b34801561053757600080fd5b50610552600480360381019061054d919061260d565b6115ca565b60405161055f91906125b5565b60405180910390f35b34801561057457600080fd5b5061058f600480360381019061058a9190612b11565b611610565b60405161059c91906125b5565b60405180910390f35b3480156105b157600080fd5b506105cc60048036038101906105c79190612b3e565b611c2b565b6040516105d9919061250a565b60405180910390f35b3480156105ee57600080fd5b50610609600480360381019061060491906127b6565b611cc3565b604051610616919061250a565b60405180910390f35b600063c22876c37c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106735760019050610864565b63d283ef1d7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036106c55760019050610864565b63dd9d20877c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107175760019050610864565b635878bcf47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107695760019050610864565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036107bb5760019050610864565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361080d5760019050610864565b637a0cdf927c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361085f5760019050610864565b600090505b919050565b600b805461087690612bad565b80601f01602080910402602001604051908101604052809291908181526020018280546108a290612bad565b80156108ef5780601f106108c4576101008083540402835291602001916108ef565b820191906000526020600020905b8154815290600101906020018083116108d257829003601f168201915b505050505081565b60006008600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b3373ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461099f57600080fd5b816008600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000600180549050905090565b6060600067ffffffffffffffff811115610a7a57610a7961292d565b5b6040519080825280601f01601f191660200182016040528015610aac5781602001600182028036833780820191505090505b509050610abb84848484611ec9565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba490612c2a565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610bf3573d6000803e3d6000fd5b5060019050919050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548210610c4a57600080fd5b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110610c9b57610c9a612c4a565b5b9060005260206000200154905092915050565b677fffffffffffffff81565b6000806003600084815260200190815260200160002054905060028181548110610ce757610ce6612c4a565b5b9060005260206000200154915050919050565b6060600067ffffffffffffffff811115610d1757610d1661292d565b5b6040519080825280601f01601f191660200182016040528015610d495781602001600182028036833780820191505090505b509050610d5884848484611ec9565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b60003373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e1357600080fd5b600060036000848152602001908152602001600020541480610e3a57506000600180549050145b610e4357600080fd5b600080600180549050915083905060018190806001815401808255809150506001900390600052602060002001600090919091909150558160036000838152602001908152602001600020819055506002439080600181540180825580915050600190039060005260206000200160009091909190915055846004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360066000600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050815260200190815260200160002081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020849080600181540180825580915050600190039060005260206000200160009091909190915055600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919061101d90612ca8565b91905055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88660405161107f9190612711565b60405180910390a360019250505092915050565b6000600182815481106110a9576110a8612c4a565b5b90600052602060002001549050919050565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61114b8484610db9565b5050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c805461118390612bad565b80601f01602080910402602001604051908101604052809291908181526020018280546111af90612bad565b80156111fc5780601f106111d1576101008083540402835291602001916111fc565b820191906000526020600020905b8154815290600101906020018083116111df57829003601f168201915b505050505081565b801561132557600073ffffffffffffffffffffffffffffffffffffffff16600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112a257600080fd5b81600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061143d565b600073ffffffffffffffffffffffffffffffffffffffff16600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036113bd57600080fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161149a919061250a565b60405180910390a35050565b6114b284848484611ec9565b818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4818373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f75c9e114f073c346aac7d1d7e9a3c3c14edabcdd27de07d1d9e425f45d318c5e600a60008781526020019081526020016000206001600a6000898152602001908152602001600020805490506115939190612cf0565b815481106115a4576115a3612c4a565b5b90600052602060002001546040516115bc9190612d33565b60405180910390a450505050565b606061160960016003600085815260200190815260200160002054815481106115f6576115f5612c4a565b5b9060005260206000200154600102611610565b9050919050565b606080600080604767ffffffffffffffff8111156116315761163061292d565b5b6040519080825280601f01601f1916602001820160405280156116635781602001600182028036833780820191505090505b5092507f73000000000000000000000000000000000000000000000000000000000000008360008151811061169b5761169a612c4a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f6800000000000000000000000000000000000000000000000000000000000000836001815181106116ff576116fe612c4a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f61000000000000000000000000000000000000000000000000000000000000008360028151811061176357611762612c4a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3200000000000000000000000000000000000000000000000000000000000000836003815181106117c7576117c6612c4a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f35000000000000000000000000000000000000000000000000000000000000008360048151811061182b5761182a612c4a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f36000000000000000000000000000000000000000000000000000000000000008360058151811061188f5761188e612c4a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f3a00000000000000000000000000000000000000000000000000000000000000836006815181106118f3576118f2612c4a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506007905060005b6020811015611c1f57600460f087836020811061194957611948612c4a565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090041660ff16908060020a82049150509250600a8360ff161015611a21576030836119b89190612d5b565b7f0100000000000000000000000000000000000000000000000000000000000000028483815181106119ed576119ec612c4a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611a93565b605783611a2e9190612d5b565b7f010000000000000000000000000000000000000000000000000000000000000002848381518110611a6357611a62612c4a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600f868260208110611aa857611aa7612c4a565b5b1a7f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004169250600a8360ff161015611b7f57603083611b0a9190612d5b565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611b3a9190612d90565b81518110611b4b57611b4a612c4a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611bfd565b605783611b8c9190612d5b565b7f01000000000000000000000000000000000000000000000000000000000000000284600184611bbc9190612d90565b81518110611bcd57611bcc612c4a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b600282611c0a9190612d90565b91508080611c1790612ca8565b915050611929565b50829350505050919050565b60008173ffffffffffffffffffffffffffffffffffffffff16600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d1e57600080fd5b606060008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600067ffffffffffffffff811115611da257611da161292d565b5b6040519080825280601f01601f191660200182016040528015611dd45781602001600182028036833780820191505090505b50925060005b8180549050811015611e2257611e0f8387848481548110611dfe57611dfd612c4a565b5b906000526020600020015487611ec9565b8080611e1a90612ca8565b915050611dda565b50846000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360019350505050919050565b60006004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508473ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f6c57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146120a0573373ffffffffffffffffffffffffffffffffffffffff166008600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061209657503373ffffffffffffffffffffffffffffffffffffffff16600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61209f57600080fd5b5b60006008600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490506121819190612cf0565b8154811061219257612191612c4a565b5b9060005260206000200154600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060066000868152602001908152602001600020548154811061220157612200612c4a565b5b9060005260206000200181905550600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919061225f90612dc4565b9190505550600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020839080600181540180825580915050600190039060005260206000200160009091909190915055600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919061231a90612ca8565b9190505550836004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060005b825181101561244e578281815181106123905761238f612c4a565b5b60200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916600a600086815260200190815260200160002060208361241c9190612e1c565b8154811061242d5761242c612c4a565b5b9060005260206000200181905550808061244690612ca8565b915050612374565b505050505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61249f8161246a565b81146124aa57600080fd5b50565b6000813590506124bc81612496565b92915050565b6000602082840312156124d8576124d7612460565b5b60006124e6848285016124ad565b91505092915050565b60008115159050919050565b612504816124ef565b82525050565b600060208201905061251f60008301846124fb565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561255f578082015181840152602081019050612544565b60008484015250505050565b6000601f19601f8301169050919050565b600061258782612525565b6125918185612530565b93506125a1818560208601612541565b6125aa8161256b565b840191505092915050565b600060208201905081810360008301526125cf818461257c565b905092915050565b6000819050919050565b6125ea816125d7565b81146125f557600080fd5b50565b600081359050612607816125e1565b92915050565b60006020828403121561262357612622612460565b5b6000612631848285016125f8565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006126658261263a565b9050919050565b6126758161265a565b82525050565b6000602082019050612690600083018461266c565b92915050565b61269f8161265a565b81146126aa57600080fd5b50565b6000813590506126bc81612696565b92915050565b600080604083850312156126d9576126d8612460565b5b60006126e7858286016126ad565b92505060206126f8858286016125f8565b9150509250929050565b61270b816125d7565b82525050565b60006020820190506127266000830184612702565b92915050565b60008060006060848603121561274557612744612460565b5b6000612753868287016126ad565b9350506020612764868287016126ad565b9250506040612775868287016125f8565b9150509250925092565b60008160070b9050919050565b6127958161277f565b82525050565b60006020820190506127b0600083018461278c565b92915050565b6000602082840312156127cc576127cb612460565b5b60006127da848285016126ad565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f840112612808576128076127e3565b5b8235905067ffffffffffffffff811115612825576128246127e8565b5b602083019150836001820283011115612841576128406127ed565b5b9250929050565b6000806000806060858703121561286257612861612460565b5b6000612870878288016126ad565b9450506020612881878288016125f8565b935050604085013567ffffffffffffffff8111156128a2576128a1612465565b5b6128ae878288016127f2565b925092505092959194509250565b6128c5816124ef565b81146128d057600080fd5b50565b6000813590506128e2816128bc565b92915050565b600080604083850312156128ff576128fe612460565b5b600061290d858286016126ad565b925050602061291e858286016128d3565b9150509250929050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6129658261256b565b810181811067ffffffffffffffff821117156129845761298361292d565b5b80604052505050565b6000612997612456565b90506129a3828261295c565b919050565b600067ffffffffffffffff8211156129c3576129c261292d565b5b6129cc8261256b565b9050602081019050919050565b82818337600083830152505050565b60006129fb6129f6846129a8565b61298d565b905082815260208101848484011115612a1757612a16612928565b5b612a228482856129d9565b509392505050565b600082601f830112612a3f57612a3e6127e3565b5b8135612a4f8482602086016129e8565b91505092915050565b60008060008060808587031215612a7257612a71612460565b5b6000612a80878288016126ad565b9450506020612a91878288016126ad565b9350506040612aa2878288016125f8565b925050606085013567ffffffffffffffff811115612ac357612ac2612465565b5b612acf87828801612a2a565b91505092959194509250565b6000819050919050565b612aee81612adb565b8114612af957600080fd5b50565b600081359050612b0b81612ae5565b92915050565b600060208284031215612b2757612b26612460565b5b6000612b3584828501612afc565b91505092915050565b60008060408385031215612b5557612b54612460565b5b6000612b63858286016126ad565b9250506020612b74858286016126ad565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612bc557607f821691505b602082108103612bd857612bd7612b7e565b5b50919050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b6000612c14600a83612530565b9150612c1f82612bde565b602082019050919050565b60006020820190508181036000830152612c4381612c07565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612cb3826125d7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612ce557612ce4612c79565b5b600182019050919050565b6000612cfb826125d7565b9150612d06836125d7565b9250828203905081811115612d1e57612d1d612c79565b5b92915050565b612d2d81612adb565b82525050565b6000602082019050612d486000830184612d24565b92915050565b600060ff82169050919050565b6000612d6682612d4e565b9150612d7183612d4e565b9250828201905060ff811115612d8a57612d89612c79565b5b92915050565b6000612d9b826125d7565b9150612da6836125d7565b9250828201905080821115612dbe57612dbd612c79565b5b92915050565b6000612dcf826125d7565b915060008203612de257612de1612c79565b5b600182039050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612e27826125d7565b9150612e32836125d7565b925082612e4257612e41612ded565b5b82820690509291505056fea2646970667358221220c64ce9922be5bc0f831e32aac1e255322752da8ec5d004316856e8a06ff1db9264736f6c63430008120033
+\ No newline at end of file
diff --git a/python/eth_badgetoken/data/BadgeToken.json b/python/eth_badgetoken/data/BadgeToken.json
@@ -1 +1 @@
-[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"TransferWithData","type":"event"},{"inputs":[{"internalType":"address","name":"_approved","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"createdAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"toURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenOwnerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
+[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"TransferWithData","type":"event"},{"inputs":[{"internalType":"address","name":"_approved","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"int64","name":"","type":"int64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"toURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
diff --git a/python/eth_badgetoken/data/BadgeToken.metadata.json b/python/eth_badgetoken/data/BadgeToken.metadata.json
@@ -1 +1 @@
-{"compiler":{"version":"0.8.18+commit.87f61d96"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"TransferWithData","type":"event"},{"inputs":[{"internalType":"address","name":"_approved","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"createdAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"toURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenOwnerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"BadgeToken.sol":"BadgeToken"},"evmVersion":"byzantium","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"BadgeToken.sol":{"keccak256":"0x75a42566d147f8c89e77393bf98863dae6b0d2522773ad9cfc6c716f20fccba0","license":"GPL-3.0-or-later","urls":["bzz-raw://9aa400e79d556e7ffc8934a6e9657282c79a2f1d229785fd4ea0721e909648ec","dweb:/ipfs/QmXsgkCF54XciuH46gkxYPXtb2vaPamxi5w6R8drqioL7y"]}},"version":1}
+{"compiler":{"version":"0.8.18+commit.87f61d96"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"TransferWithData","type":"event"},{"inputs":[{"internalType":"address","name":"_approved","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"int64","name":"","type":"int64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"toURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"BadgeToken.sol":"BadgeToken"},"evmVersion":"byzantium","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"BadgeToken.sol":{"keccak256":"0x9d7b1e1daa91cec0e985ff190f192dbf6d494dcf0def420caf90b3c03c6f037e","license":"AGPL-3.0-or-later","urls":["bzz-raw://9cd0c2a95c4b2dc6e7c1afd22285400b48abb8b68103a104e75039a0d23c012c","dweb:/ipfs/QmNxvpVqBxjKRwCo2tk8m44ckszDiGown9WpEoKPj9LN7M"]}},"version":1}
diff --git a/python/eth_badgetoken/token.py b/python/eth_badgetoken/token.py
@@ -85,12 +85,12 @@ class BadgeToken(ERC721):
return tx
- def created_at(self, contract_address, token_id, sender_address=ZERO_ADDRESS, id_generator=None):
+ def start_time(self, contract_address, token_id, sender_address=ZERO_ADDRESS, id_generator=None):
j = JSONRPCRequest(id_generator)
o = j.template()
o['method'] = 'eth_call'
enc = ABIContractEncoder()
- enc.method('createdAt')
+ enc.method('startTime')
enc.typ(ABIContractType.UINT256)
enc.uint256(token_id)
data = add_0x(enc.get())
@@ -102,8 +102,29 @@ class BadgeToken(ERC721):
return o
+ def end_time(self, contract_address, token_id, sender_address=ZERO_ADDRESS, id_generator=None):
+ j = JSONRPCRequest(id_generator)
+ o = j.template()
+ o['method'] = 'eth_call'
+ enc = ABIContractEncoder()
+ enc.method('endTime')
+ enc.typ(ABIContractType.UINT256)
+ enc.uint256(token_id)
+ data = add_0x(enc.get())
+ tx = self.template(sender_address, contract_address)
+ tx = self.set_code(tx, data)
+ o['params'].append(self.normalize(tx))
+ o['params'].append('latest')
+ o = j.finalize(o)
+ return o
+
+
+ @classmethod
+ def parse_start_time(self, v):
+ return abi_decode_single(ABIContractType.UINT256, v)
+
@classmethod
- def parse_created_at(self, v):
+ def parse_end_time(self, v):
return abi_decode_single(ABIContractType.UINT256, v)
diff --git a/python/eth_badgetoken/unittest/interface.py b/python/eth_badgetoken/unittest/interface.py
@@ -17,7 +17,7 @@ class TestInterface(TestInterfaceBase):
token_id = int.from_bytes(token_bytes, byteorder='big')
c = self._mint(self.accounts[1], token_id)
- o = c.created_at(self.address, token_id, sender_address=self.accounts[0])
+ o = c.start_time(self.address, token_id, sender_address=self.accounts[0])
r = self.rpc.do(o)
- height = c.parse_created_at(r)
+ height = c.parse_start_time(r)
self.assertEqual(height, block_start + 42 + 1)
diff --git a/python/eth_erc721/erc721.py b/python/eth_erc721/erc721.py
@@ -14,10 +14,10 @@ from hexathon import (
add_0x,
)
from eth_erc20 import ERC20
-from eth_owned import EIP173
+from eth_owned import ERC173
-class ERC721(ERC20, EIP173):
+class ERC721(ERC20, ERC173):
def transfer(self, contract_address, sender_address, recipient_address, value, tx_format=TxFormat.JSONRPC):
raise NotImplementedError('EIP721 does not implement ERC20.transfer')
diff --git a/python/requirements.txt b/python/requirements.txt
@@ -1,3 +1,4 @@
chainlib-eth~=0.4.16
chainlib~=0.4.12
eth-erc20~=0.7.1
+eth-owned~=0.1.0
diff --git a/python/setup.cfg b/python/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = eth-erc721
-version = 0.1.6
+version = 0.2.0
description = ERC721 interface and simple contract with deployment script providing arbitrary minting of NFTs with freely settable tokenids
author = Louis Holbrook
author_email = dev@holbrook.no
diff --git a/solidity/BadgeToken.sol b/solidity/BadgeToken.sol
@@ -1,9 +1,8 @@
-pragma solidity ^0.8.0;
+pragma solidity >=0.8.0;
-// SPDX-License-Identifier: GPL-3.0-or-later
+// SPDX-License-Identifier: AGPL-3.0-or-later
contract BadgeToken {
-
// EIP 173
address public owner;
@@ -14,32 +13,35 @@ contract BadgeToken {
mapping(uint256 => address) tokenOwner; // tokenId to owner address
mapping(address => uint256[]) tokenOwnerIndex; // index of owned tokens by owner address
mapping(uint256 => uint256) tokenOwnerIdIndex; // index of owned token ids in tokenOwnerIndex
- mapping(address => uint256) public tokenOwnerCount; // end of token owner index array
+ mapping(address => uint256) tokenOwnerCount; // end of token owner index array
mapping(uint256 => address) tokenAllowance; // backend for approve
mapping(address => address) tokenOperator; // backend for setApprovalForAll
mapping(uint256 => bytes32[]) tokenData; // store optional data submitted with safeTransferFrom
- // ERC-721 (Metadata - optional)
+ // Implements ERC721Metadata
string public name;
- // ERC-721 (Metadata - optional)
+ // Implements ERC721Metadata
string public symbol;
- // ERC-721
+ // Implements ERC5007
+ int64 constant public endTime = 9223372036854775807; // max int64
+
+ // Implements ERC721
event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);
- // ERC-721
+ // Implements ERC721
event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);
- // ERC-721
+ // Implements ERC721
event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);
- // EIP-173
+ // Implements ERC173
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event TransferWithData(address indexed _from, address indexed _to, uint256 indexed _tokenId, bytes32 _data);
- // Minter
+ // Implements Minter
event Mint(address indexed _minter, address indexed _beneficiary, uint256 value);
constructor(string memory _name, string memory _symbol) {
@@ -51,14 +53,15 @@ contract BadgeToken {
function withdraw(uint256 _amount) public returns(bool) {
require(msg.sender == owner, 'ERR_ACCESS');
payable(msg.sender).transfer(_amount);
+ return true;
}
- // ERC-721
+ // Implements ERC721
function balanceOf(address _owner) external view returns (uint256) {
return tokenOwnerCount[_owner];
}
- // ERC-721
+ // Implements ERC721
function ownerOf(uint256 _tokenId) external view returns (address) {
return tokenOwner[_tokenId];
}
@@ -88,7 +91,7 @@ contract BadgeToken {
}
}
- // ERC-721
+ // Implements ERC721
function transferFrom(address _from, address _to, uint256 _tokenId) external payable {
bytes memory _data;
@@ -97,14 +100,14 @@ contract BadgeToken {
emit Transfer(_from, _to, _tokenId);
}
- // ERC-721
+ // Implements ERC721
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory _data) external payable {
transferCore(_from, _to, _tokenId, _data);
emit Transfer(_from, _to, _tokenId);
emit TransferWithData(_from, _to, _tokenId, tokenData[_tokenId][tokenData[_tokenId].length-1]);
}
- // ERC-721
+ // Implements ERC721
function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable {
bytes memory _data;
@@ -113,7 +116,7 @@ contract BadgeToken {
emit Transfer(_from, _to, _tokenId);
}
- // ERC-721
+ // Implements ERC721
function approve(address _approved, uint256 _tokenId) external payable {
require(tokenOwner[_tokenId] == msg.sender);
@@ -122,7 +125,7 @@ contract BadgeToken {
emit Approval(msg.sender, _approved, _tokenId);
}
- // ERC-721
+ // Implements ERC721
function setApprovalForAll(address _operator, bool _approved) external {
if (_approved) {
require(tokenOperator[msg.sender] == address(0)); // save a few bucks in gas if fail
@@ -134,34 +137,35 @@ contract BadgeToken {
emit ApprovalForAll(msg.sender, _operator, _approved);
}
- // ERC-721
+ // Implements ERC721
function getApproved(uint256 _tokenId) external view returns (address) {
return tokenAllowance[_tokenId];
}
- // ERC-721
+ // Implements ERC721
function isApprovedForAll(address _owner, address _operator) external view returns (bool) {
return tokenOperator[_owner] == _operator;
}
- // ERC-721 (Enumerable - optional)
+ // Implements ERC721Enumerable
function totalSupply() external view returns (uint256) {
return token.length;
}
- // ERC-721 (Enumerable - optional)
+ // Implements ERC721Enumerable
function tokenByIndex(uint256 _index) external view returns (uint256) {
return token[_index];
}
- // ERC-721 (Enumerable - optional)
+ // Implements ERC721Enumerable
function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256) {
require(_index < tokenOwnerCount[_owner]);
return tokenOwnerIndex[_owner][_index];
}
- // create sha256 scheme URI from tokenId
+ // TODO: Implement Locator
+ // Create sha256 uri from data
function toURI(bytes32 _data) public pure returns(string memory) {
bytes memory out;
uint8 t;
@@ -195,13 +199,13 @@ contract BadgeToken {
return string(out);
}
- // ERC-721 (Metadata - optional)
+ // Implements ERC721Metadata
function tokenURI(uint256 _tokenId) public view returns (string memory) {
return toURI(bytes32(token[tokenIndex[_tokenId]]));
}
- // Minter
- function mintTo(address _beneficiary, uint256 _tokenId) external returns (bool) {
+ // Implements Minter
+ function mintTo(address _beneficiary, uint256 _tokenId) public returns (bool) {
require(owner == msg.sender);
require(tokenIndex[_tokenId] == 0x0 || token.length == 0);
@@ -224,8 +228,14 @@ contract BadgeToken {
return true;
}
- // Chrono
- function createdAt(uint256 _tokenId) public view returns (uint256) {
+ // Implements Minter
+ function safeMint(address _beneficiary, uint256 _tokenId, bytes calldata _data) public {
+ _data;
+ mintTo(_beneficiary, _tokenId);
+ }
+
+ // Implements ERC5007
+ function startTime(uint256 _tokenId) public view returns (uint256) {
uint256 _tokenIndex;
_tokenIndex = tokenIndex[_tokenId];
@@ -233,7 +243,7 @@ contract BadgeToken {
return tokenMintedAt[_tokenIndex];
}
- // EIP-173
+ // Implements ERC173
function transferOwnership(address _newOwner) external returns (bool) {
require(msg.sender == owner);
@@ -244,6 +254,7 @@ contract BadgeToken {
previousOwner = owner;
currentTokenOwnerIndex = tokenOwnerIndex[previousOwner];
+ // TODO: Dangerous, may run out of gas
zeroData = new bytes(0);
for (uint256 i = 0; i < currentTokenOwnerIndex.length; i++) {
transferCore(previousOwner, _newOwner, currentTokenOwnerIndex[i], zeroData);
@@ -256,21 +267,27 @@ contract BadgeToken {
}
- // EIP-165
+ // Implements ERC165
function supportsInterface(bytes4 interfaceID) external pure returns (bool) {
- if (interfaceID == 0xc22876c3) { // EIP 721
+ if (interfaceID == 0xc22876c3) { // ERC721
+ return true;
+ }
+ if (interfaceID == 0xd283ef1d) { // ERC721Metadata
+ return true;
+ }
+ if (interfaceID == 0xdd9d2087) { // ERC721Enumerable
return true;
}
- if (interfaceID == 0xd283ef1d) { // EIP 721 (Metadata - optional)
+ if (interfaceID == 0x5878bcf4) { // Minter
return true;
}
- if (interfaceID == 0xdd9d2087) { // EIP 721 (Enumerable - optional)
+ if (interfaceID == 0x01ffc9a7) { // ERC165
return true;
}
- if (interfaceID == 0x449a52f8) { // Minter
+ if (interfaceID == 0x9493f8b2) { // ERC173
return true;
}
- if (interfaceID == 0x01ffc9a7) { // EIP 165
+ if (interfaceID == 0x7a0cdf92) { // ERC5007
return true;
}
return false;