commit ce726994c8dcb8a78a515f84675a371143464fa8
parent e8550b2105d205bf118e0c5c6c159b00d7ef1ae3
Author: lash <dev@holbrook.no>
Date: Sat, 10 Dec 2022 13:44:32 +0000
Correct low serial increment
Diffstat:
7 files changed, 137 insertions(+), 8 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -3,4 +3,6 @@ __pycache__
*.egg-info/
build/
dist/
+solidity/*.bin
+solidity/*.json
gmon.out
diff --git a/python/erc20_transfer_authorization/data/ERC20TransferAuthorization.bin b/python/erc20_transfer_authorization/data/ERC20TransferAuthorization.bin
@@ -1 +1 @@
-60806040523480156200001157600080fd5b5033600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260146101000a81548163ffffffff021916908363ffffffff1602179055506001600260186101000a81548163ffffffff021916908363ffffffff160217905550620000b133620000d6640100000000026401000000009004565b50620000cf60016000620002ef640100000000026401000000009004565b50620005e7565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200016b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001629062000481565b60405180910390fd5b60001515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151462000201576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001f890620004f3565b60405180910390fd5b6001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506003600881819054906101000a900463ffffffff16809291906200027d9062000554565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f6ff3aa2ea7b53070f6d9d07a445d338d89e8edef44250ffa8be19f53910d4a2e82604051620002cd9190620005ca565b60405180910390a1600360089054906101000a900463ffffffff169050919050565b6000600360089054906101000a900463ffffffff1663ffffffff168363ffffffff1611156200031d57600080fd5b60008363ffffffff16116200033157600080fd5b600360089054906101000a900463ffffffff1663ffffffff168263ffffffff1611156200035d57600080fd5b82600360006101000a81548163ffffffff021916908363ffffffff16021790555081600360046101000a81548163ffffffff021916908363ffffffff160217905550600360089054906101000a900463ffffffff1663ffffffff16600360049054906101000a900463ffffffff1663ffffffff16600360009054906101000a900463ffffffff1663ffffffff167fe77378573ac0f86c7fa8dd116b1fa17cf9c328a09a0c56a2c42d786103ac5bc360405160405180910390a46001905092915050565b600082825260208201905092915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b600062000469600a8362000420565b9150620004768262000431565b602082019050919050565b600060208201905081810360008301526200049c816200045a565b9050919050565b7f4552525f4e4f54464f554e440000000000000000000000000000000000000000600082015250565b6000620004db600c8362000420565b9150620004e882620004a3565b602082019050919050565b600060208201905081810360008301526200050e81620004cc565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff82169050919050565b6000620005618262000544565b915063ffffffff82036200057a576200057962000515565b5b600182019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620005b28262000585565b9050919050565b620005c481620005a5565b82525050565b6000602082019050620005e16000830184620005b9565b92915050565b61270e80620005f76000396000f3fe608060405234801561001057600080fd5b5060043610610154576000357c010000000000000000000000000000000000000000000000000000000090048063614f427f116100d55780637ca548c6116100995780637ca548c6146103d65780637f4dbec1146103f45780638da5cb5b14610424578063da2824a814610442578063ed71262a14610472578063fdd33d68146104a257610154565b8063614f427f146102f8578063655c013114610316578063669cd53b1461034657806366a5267214610376578063736c0d5b146103a657610154565b80631703a0181161011c5780631703a0181461022c5780632b29ba231461024a578063476ce3ad1461027a5780635356dddc146102aa57806357ec347a146102da57610154565b806306661abd1461015957806308ae6377146101775780630ab469b0146101955780630ac94000146101cc57806310858c67146101fc575b600080fd5b6101616104d2565b60405161016e9190611f0d565b60405180910390f35b61017f6104e8565b60405161018c9190611f0d565b60405180910390f35b6101af60048036038101906101aa9190611f59565b610548565b6040516101c3989796959493929190611ffc565b60405180910390f35b6101e660048036038101906101e19190611f59565b61062d565b6040516101f39190612095565b60405180910390f35b61021660048036038101906102119190611f59565b610978565b6040516102239190611f0d565b60405180910390f35b610234610a5a565b6040516102419190611f0d565b60405180910390f35b610264600480360381019061025f91906120dc565b610a70565b6040516102719190612095565b60405180910390f35b610294600480360381019061028f9190611f59565b610ac6565b6040516102a19190611f0d565b60405180910390f35b6102c460048036038101906102bf91906120dc565b610d50565b6040516102d19190611f0d565b60405180910390f35b6102e261100c565b6040516102ef9190611f0d565b60405180910390f35b610300611032565b60405161030d9190611f0d565b60405180910390f35b610330600480360381019061032b9190612109565b611048565b60405161033d9190612165565b60405180910390f35b610360600480360381019061035b9190612180565b611077565b60405161036d9190612095565b60405180910390f35b610390600480360381019061038b91906121ec565b6111a5565b60405161039d9190612219565b60405180910390f35b6103c060048036038101906103bb91906120dc565b6111e4565b6040516103cd9190612095565b60405180910390f35b6103de611204565b6040516103eb9190611f0d565b60405180910390f35b61040e60048036038101906104099190611f59565b61121a565b60405161041b9190611f0d565b60405180910390f35b61042c6114c3565b6040516104399190612219565b60405180910390f35b61045c600480360381019061045791906120dc565b6114e9565b6040516104699190611f0d565b60405180910390f35b61048c60048036038101906104879190612234565b6116f8565b6040516104999190611f0d565b60405180910390f35b6104bc60048036038101906104b79190611f59565b6119f7565b6040516104c99190612095565b60405180910390f35b6002601c9054906101000a900463ffffffff1681565b600080600260189054906101000a900463ffffffff16600260149054906101000a900463ffffffff1661051b91906122ca565b63ffffffff160361052f5760009050610545565b600260189054906101000a900463ffffffff1690505b90565b60016020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160149054906101000a900463ffffffff16908060030160189054906101000a900463ffffffff169080600301601c9054906101000a900463ffffffff16908060040160009054906101000a900460ff16905088565b600080600160008463ffffffff1663ffffffff168152602001908152602001600020905060008160030160149054906101000a900463ffffffff1663ffffffff16116106ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a59061235f565b60405180910390fd5b60038160040160009054906101000a900460ff1660ff1614610705576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106fc906123cb565b60405180910390fd5b6107228160030160149054906101000a900463ffffffff16611d9a565b5060088160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff1602179055506000808260030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168460020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685600001546040516024016107f2939291906123eb565b6040516020818303038152906040527f23b872dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161087c9190612493565b6000604051808303816000865af19150503d80600081146108b9576040519150601f19603f3d011682016040523d82523d6000602084013e6108be565b606091505b50915091508115610905577fa80d5e3445b11533e6c584c506299aa14168f2ad1fe65b0266e7d622c5461c30856040516108f89190611f0d565b60405180910390a161096d565b60108360040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff1602179055507f8f15e24c8a8ecaa6b067f0cd2c220532e6496f53b2ac3263129d1496cb6f192e856040516109649190611f0d565b60405180910390a15b819350505050919050565b6000806000600260189054906101000a900463ffffffff1690505b600260149054906101000a900463ffffffff1663ffffffff168163ffffffff161015610a4e576000600160008363ffffffff1663ffffffff168152602001908152602001600020905060008160040160009054906101000a900460ff1660ff161115610a3a578463ffffffff168363ffffffff1603610a2b578060030160149054906101000a900463ffffffff169350505050610a55565b8280610a36906124aa565b9350505b508080610a46906124aa565b915050610993565b5060009150505b919050565b600360009054906101000a900463ffffffff1681565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610b54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4b90612522565b60405180910390fd5b60008060008463ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460000b60000b14610c02576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf99061258e565b60405180910390fd5b6000600160008463ffffffff1663ffffffff168152602001908152602001600020905060018160040160009054906101000a900460ff1660ff1614610c4657600080fd5b60016000808360030160149054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360000b60ff16021790555080600301601881819054906101000a900463ffffffff1680929190610cf6906124aa565b91906101000a81548163ffffffff021916908363ffffffff16021790555050610d328160030160149054906101000a900463ffffffff166119f7565b508060030160189054906101000a900463ffffffff16915050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd990612522565b60405180910390fd5b60011515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610e75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6c906125fa565b60405180910390fd5b600360009054906101000a900463ffffffff1663ffffffff16600360089054906101000a900463ffffffff1663ffffffff16118015610ee35750600360049054906101000a900463ffffffff1663ffffffff16600360089054906101000a900463ffffffff1663ffffffff16115b610f22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1990612666565b60405180910390fd5b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506003600881819054906101000a900463ffffffff1680929190610f9c90612686565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f86e5bbceda94081c32220d685f37cc4e3ea7bb0be2dfbf0cb703579505a5390e82604051610fea9190612219565b60405180910390a1600360089054906101000a900463ffffffff169050919050565b60006001600260149054906101000a900463ffffffff1661102d91906122ca565b905090565b600360049054906101000a900463ffffffff1681565b60006020528160005260406000206020528060005260406000206000915091509054906101000a900460000b81565b6000600360089054906101000a900463ffffffff1663ffffffff168363ffffffff1611156110a457600080fd5b60008363ffffffff16116110b757600080fd5b600360089054906101000a900463ffffffff1663ffffffff168263ffffffff1611156110e257600080fd5b82600360006101000a81548163ffffffff021916908363ffffffff16021790555081600360046101000a81548163ffffffff021916908363ffffffff160217905550600360089054906101000a900463ffffffff1663ffffffff16600360049054906101000a900463ffffffff1663ffffffff16600360009054906101000a900463ffffffff1663ffffffff167fe77378573ac0f86c7fa8dd116b1fa17cf9c328a09a0c56a2c42d786103ac5bc360405160405180910390a46001905092915050565b600581815481106111b557600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60046020528060005260406000206000915054906101000a900460ff1681565b600360089054906101000a900463ffffffff1681565b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166112a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129f90612522565b60405180910390fd5b60008060008463ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460000b60000b14611356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134d9061258e565b60405180910390fd5b6000600160008463ffffffff1663ffffffff168152602001908152602001600020905060018160040160009054906101000a900460ff1660ff161461139a57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000808360030160149054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360000b60ff16021790555080600301601c81819054906101000a900463ffffffff1680929190611469906124aa565b91906101000a81548163ffffffff021916908363ffffffff160217905550506114a58160030160149054906101000a900463ffffffff166119f7565b5080600301601c9054906101000a900463ffffffff16915050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461157b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157290612522565b60405180910390fd5b60001515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151461160e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611605906125fa565b60405180910390fd5b6001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506003600881819054906101000a900463ffffffff1680929190611688906124aa565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f6ff3aa2ea7b53070f6d9d07a445d338d89e8edef44250ffa8be19f53910d4a2e826040516116d69190612219565b60405180910390a1600360089054906101000a900463ffffffff169050919050565b60008060016000600260149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020019081526020016000209050600260149054906101000a900463ffffffff168160030160146101000a81548163ffffffff021916908363ffffffff160217905550848160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550858160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082816000018190555060018160040160006101000a81548160ff021916908360ff1602179055506002601c81819054906101000a900463ffffffff1680929190611875906124aa565b91906101000a81548163ffffffff021916908363ffffffff160217905550506002601481819054906101000a900463ffffffff16809291906118b6906124aa565b91906101000a81548163ffffffff021916908363ffffffff160217905550508060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f3ba7a259b57ae3d653287762394374c856528591f691ecd6494021fdcea00f2484600001548560030160149054906101000a900463ffffffff166040516119cf9291906126af565b60405180910390a48060030160149054906101000a900463ffffffff16915050949350505050565b6000806000600160008563ffffffff1663ffffffff168152602001908152602001600020905060018160040160009054906101000a900460ff1660ff161015611a44578192505050611d95565b600360009054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff1610611b335760028160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff16021790555080600301601c9054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff168260030160149054906101000a900463ffffffff1663ffffffff167f7a17acca3819c1012204b2d019c0ee13bb7e5cf151111030329219582ba83f3160405160405180910390a460019150611d8f565b6000600360049054906101000a900463ffffffff1663ffffffff16118015611b8d5750600360049054906101000a900463ffffffff1663ffffffff1681600301601c9054906101000a900463ffffffff1663ffffffff1610155b15611c665760048160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff160217905550611bdf8160030160149054906101000a900463ffffffff16611d9a565b5080600301601c9054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff168260030160149054906101000a900463ffffffff1663ffffffff167f4bdd2d0e6caefafbf833eda0d32f2dcb0e7a621e3e7b87b2a17c12090edbc0d660405160405180910390a460019150611d8e565b600360009054906101000a900463ffffffff1663ffffffff1681600301601c9054906101000a900463ffffffff16600360089054906101000a900463ffffffff16611cb191906122ca565b63ffffffff161015611d8d5760048160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff160217905550611d0a8160030160149054906101000a900463ffffffff16611d9a565b5080600301601c9054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff168260030160149054906101000a900463ffffffff1663ffffffff167f3c478de516aa199022ddcd594a6e3b7f03a3e23bfcafd6143adceb687a8e38ea60405160405180910390a4600191505b5b5b81925050505b919050565b60006002601c81819054906101000a900463ffffffff1680929190611dbe90612686565b91906101000a81548163ffffffff021916908363ffffffff1602179055505060006002601c9054906101000a900463ffffffff1663ffffffff161115611ea057600260189054906101000a900463ffffffff1663ffffffff168263ffffffff1603611e9b576000611e2f6000610978565b905060008163ffffffff1603611e7757600260149054906101000a900463ffffffff16600260186101000a81548163ffffffff021916908363ffffffff160217905550611e99565b80600260186101000a81548163ffffffff021916908363ffffffff1602179055505b505b611ed4565b600260149054906101000a900463ffffffff16600260186101000a81548163ffffffff021916908363ffffffff1602179055505b600260189054906101000a900463ffffffff169050919050565b600063ffffffff82169050919050565b611f0781611eee565b82525050565b6000602082019050611f226000830184611efe565b92915050565b600080fd5b611f3681611eee565b8114611f4157600080fd5b50565b600081359050611f5381611f2d565b92915050565b600060208284031215611f6f57611f6e611f28565b5b6000611f7d84828501611f44565b91505092915050565b6000819050919050565b611f9981611f86565b82525050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611fca82611f9f565b9050919050565b611fda81611fbf565b82525050565b600060ff82169050919050565b611ff681611fe0565b82525050565b600061010082019050612012600083018b611f90565b61201f602083018a611fd1565b61202c6040830189611fd1565b6120396060830188611fd1565b6120466080830187611efe565b61205360a0830186611efe565b61206060c0830185611efe565b61206d60e0830184611fed565b9998505050505050505050565b60008115159050919050565b61208f8161207a565b82525050565b60006020820190506120aa6000830184612086565b92915050565b6120b981611fbf565b81146120c457600080fd5b50565b6000813590506120d6816120b0565b92915050565b6000602082840312156120f2576120f1611f28565b5b6000612100848285016120c7565b91505092915050565b600080604083850312156121205761211f611f28565b5b600061212e85828601611f44565b925050602061213f858286016120c7565b9150509250929050565b60008160000b9050919050565b61215f81612149565b82525050565b600060208201905061217a6000830184612156565b92915050565b6000806040838503121561219757612196611f28565b5b60006121a585828601611f44565b92505060206121b685828601611f44565b9150509250929050565b6121c981611f86565b81146121d457600080fd5b50565b6000813590506121e6816121c0565b92915050565b60006020828403121561220257612201611f28565b5b6000612210848285016121d7565b91505092915050565b600060208201905061222e6000830184611fd1565b92915050565b6000806000806080858703121561224e5761224d611f28565b5b600061225c878288016120c7565b945050602061226d878288016120c7565b935050604061227e878288016120c7565b925050606061228f878288016121d7565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006122d582611eee565b91506122e083611eee565b9250828203905063ffffffff8111156122fc576122fb61229b565b5b92915050565b600082825260208201905092915050565b7f4552525f494e56414c49445f5245515545535400000000000000000000000000600082015250565b6000612349601383612302565b915061235482612313565b602082019050919050565b600060208201905081810360008301526123788161233c565b9050919050565b7f4552525f4e4f545f454e444f5253454400000000000000000000000000000000600082015250565b60006123b5601083612302565b91506123c08261237f565b602082019050919050565b600060208201905081810360008301526123e4816123a8565b9050919050565b60006060820190506124006000830186611fd1565b61240d6020830185611fd1565b61241a6040830184611f90565b949350505050565b600081519050919050565b600081905092915050565b60005b8381101561245657808201518184015260208101905061243b565b60008484015250505050565b600061246d82612422565b612477818561242d565b9350612487818560208601612438565b80840191505092915050565b600061249f8284612462565b915081905092915050565b60006124b582611eee565b915063ffffffff82036124cb576124ca61229b565b5b600182019050919050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b600061250c600a83612302565b9150612517826124d6565b602082019050919050565b6000602082019050818103600083015261253b816124ff565b9050919050565b7f4552525f414c5245414459564f54454400000000000000000000000000000000600082015250565b6000612578601083612302565b915061258382612542565b602082019050919050565b600060208201905081810360008301526125a78161256b565b9050919050565b7f4552525f4e4f54464f554e440000000000000000000000000000000000000000600082015250565b60006125e4600c83612302565b91506125ef826125ae565b602082019050919050565b60006020820190508181036000830152612613816125d7565b9050919050565b7f4552525f5245445543455f5448524553484f4c445f4649525354000000000000600082015250565b6000612650601a83612302565b915061265b8261261a565b602082019050919050565b6000602082019050818103600083015261267f81612643565b9050919050565b600061269182611eee565b9150600082036126a4576126a361229b565b5b600182039050919050565b60006040820190506126c46000830185611f90565b6126d16020830184611efe565b939250505056fea2646970667358221220441ad54fe6f08f891580df338880b0f83cdbd00aaa43398c54418ae9d041b5cc64736f6c63430008110033
-\ No newline at end of file
+60806040523480156200001157600080fd5b5033600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260146101000a81548163ffffffff021916908363ffffffff1602179055506001600260186101000a81548163ffffffff021916908363ffffffff160217905550620000b133620000d6640100000000026401000000009004565b50620000cf60016000620002ef640100000000026401000000009004565b50620005e7565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200016b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001629062000481565b60405180910390fd5b60001515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151462000201576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001f890620004f3565b60405180910390fd5b6001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506003600881819054906101000a900463ffffffff16809291906200027d9062000554565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f6ff3aa2ea7b53070f6d9d07a445d338d89e8edef44250ffa8be19f53910d4a2e82604051620002cd9190620005ca565b60405180910390a1600360089054906101000a900463ffffffff169050919050565b6000600360089054906101000a900463ffffffff1663ffffffff168363ffffffff1611156200031d57600080fd5b60008363ffffffff16116200033157600080fd5b600360089054906101000a900463ffffffff1663ffffffff168263ffffffff1611156200035d57600080fd5b82600360006101000a81548163ffffffff021916908363ffffffff16021790555081600360046101000a81548163ffffffff021916908363ffffffff160217905550600360089054906101000a900463ffffffff1663ffffffff16600360049054906101000a900463ffffffff1663ffffffff16600360009054906101000a900463ffffffff1663ffffffff167fe77378573ac0f86c7fa8dd116b1fa17cf9c328a09a0c56a2c42d786103ac5bc360405160405180910390a46001905092915050565b600082825260208201905092915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b600062000469600a8362000420565b9150620004768262000431565b602082019050919050565b600060208201905081810360008301526200049c816200045a565b9050919050565b7f4552525f4e4f54464f554e440000000000000000000000000000000000000000600082015250565b6000620004db600c8362000420565b9150620004e882620004a3565b602082019050919050565b600060208201905081810360008301526200050e81620004cc565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff82169050919050565b6000620005618262000544565b915063ffffffff82036200057a576200057962000515565b5b600182019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620005b28262000585565b9050919050565b620005c481620005a5565b82525050565b6000602082019050620005e16000830184620005b9565b92915050565b6127e280620005f76000396000f3fe608060405234801561001057600080fd5b5060043610610154576000357c010000000000000000000000000000000000000000000000000000000090048063614f427f116100d55780637ca548c6116100995780637ca548c6146103d65780637f4dbec1146103f45780638da5cb5b14610424578063da2824a814610442578063ed71262a14610472578063fdd33d68146104a257610154565b8063614f427f146102f8578063655c013114610316578063669cd53b1461034657806366a5267214610376578063736c0d5b146103a657610154565b80631703a0181161011c5780631703a0181461022c5780632b29ba231461024a578063476ce3ad1461027a5780635356dddc146102aa57806357ec347a146102da57610154565b806306661abd1461015957806308ae6377146101775780630ab469b0146101955780630ac94000146101cc57806310858c67146101fc575b600080fd5b6101616104d2565b60405161016e9190611fe1565b60405180910390f35b61017f6104e8565b60405161018c9190611fe1565b60405180910390f35b6101af60048036038101906101aa919061202d565b6105df565b6040516101c39897969594939291906120d0565b60405180910390f35b6101e660048036038101906101e1919061202d565b6106c4565b6040516101f39190612169565b60405180910390f35b6102166004803603810190610211919061202d565b610a12565b6040516102239190611fe1565b60405180910390f35b610234610af6565b6040516102419190611fe1565b60405180910390f35b610264600480360381019061025f91906121b0565b610b0c565b6040516102719190612169565b60405180910390f35b610294600480360381019061028f919061202d565b610b62565b6040516102a19190611fe1565b60405180910390f35b6102c460048036038101906102bf91906121b0565b610dec565b6040516102d19190611fe1565b60405180910390f35b6102e26110a8565b6040516102ef9190611fe1565b60405180910390f35b6103006110ce565b60405161030d9190611fe1565b60405180910390f35b610330600480360381019061032b91906121dd565b6110e4565b60405161033d9190612239565b60405180910390f35b610360600480360381019061035b9190612254565b611113565b60405161036d9190612169565b60405180910390f35b610390600480360381019061038b91906122c0565b611241565b60405161039d91906122ed565b60405180910390f35b6103c060048036038101906103bb91906121b0565b611280565b6040516103cd9190612169565b60405180910390f35b6103de6112a0565b6040516103eb9190611fe1565b60405180910390f35b61040e6004803603810190610409919061202d565b6112b6565b60405161041b9190611fe1565b60405180910390f35b61042c61155f565b60405161043991906122ed565b60405180910390f35b61045c600480360381019061045791906121b0565b611585565b6040516104699190611fe1565b60405180910390f35b61048c60048036038101906104879190612308565b611794565b6040516104999190611fe1565b60405180910390f35b6104bc60048036038101906104b7919061202d565b611a93565b6040516104c99190612169565b60405180910390f35b6002601c9054906101000a900463ffffffff1681565b600080600260189054906101000a900463ffffffff16600260149054906101000a900463ffffffff1661051b919061239e565b63ffffffff16036105c6576001600260149054906101000a900463ffffffff1663ffffffff160361054f57600090506105dc565b600060016000600260189054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001908152602001600020905060008160040160009054906101000a900460ff1660ff1611156105bc57600260189054906101000a900463ffffffff169150506105dc565b60009150506105dc565b600260189054906101000a900463ffffffff1690505b90565b60016020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160149054906101000a900463ffffffff16908060030160189054906101000a900463ffffffff169080600301601c9054906101000a900463ffffffff16908060040160009054906101000a900460ff16905088565b600080600160008463ffffffff1663ffffffff168152602001908152602001600020905060008160030160149054906101000a900463ffffffff1663ffffffff1611610745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073c90612433565b60405180910390fd5b6003600b8260040160009054906101000a900460ff161660ff161461079f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107969061249f565b60405180910390fd5b6107bc8160030160149054906101000a900463ffffffff16611e36565b5060088160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff1602179055506000808260030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168460020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856000015460405160240161088c939291906124bf565b6040516020818303038152906040527f23b872dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516109169190612567565b6000604051808303816000865af19150503d8060008114610953576040519150601f19603f3d011682016040523d82523d6000602084013e610958565b606091505b5091509150811561099f577fa80d5e3445b11533e6c584c506299aa14168f2ad1fe65b0266e7d622c5461c30856040516109929190611fe1565b60405180910390a1610a07565b60108360040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff1602179055507f8f15e24c8a8ecaa6b067f0cd2c220532e6496f53b2ac3263129d1496cb6f192e856040516109fe9190611fe1565b60405180910390a15b819350505050919050565b6000806000600260189054906101000a900463ffffffff1690505b600260149054906101000a900463ffffffff1663ffffffff168163ffffffff161015610aea576000600160008363ffffffff1663ffffffff1681526020019081526020016000209050600160078260040160009054906101000a900460ff161660ff1603610ad6578463ffffffff168363ffffffff1603610ac7578060030160149054906101000a900463ffffffff169350505050610af1565b8280610ad29061257e565b9350505b508080610ae29061257e565b915050610a2d565b5060009150505b919050565b600360009054906101000a900463ffffffff1681565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610bf0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be7906125f6565b60405180910390fd5b60008060008463ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460000b60000b14610c9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9590612662565b60405180910390fd5b6000600160008463ffffffff1663ffffffff168152602001908152602001600020905060018160040160009054906101000a900460ff1660ff1614610ce257600080fd5b60016000808360030160149054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360000b60ff16021790555080600301601881819054906101000a900463ffffffff1680929190610d929061257e565b91906101000a81548163ffffffff021916908363ffffffff16021790555050610dce8160030160149054906101000a900463ffffffff16611a93565b508060030160189054906101000a900463ffffffff16915050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e75906125f6565b60405180910390fd5b60011515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610f11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f08906126ce565b60405180910390fd5b600360009054906101000a900463ffffffff1663ffffffff16600360089054906101000a900463ffffffff1663ffffffff16118015610f7f5750600360049054906101000a900463ffffffff1663ffffffff16600360089054906101000a900463ffffffff1663ffffffff16115b610fbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb59061273a565b60405180910390fd5b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506003600881819054906101000a900463ffffffff16809291906110389061275a565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f86e5bbceda94081c32220d685f37cc4e3ea7bb0be2dfbf0cb703579505a5390e8260405161108691906122ed565b60405180910390a1600360089054906101000a900463ffffffff169050919050565b60006001600260149054906101000a900463ffffffff166110c9919061239e565b905090565b600360049054906101000a900463ffffffff1681565b60006020528160005260406000206020528060005260406000206000915091509054906101000a900460000b81565b6000600360089054906101000a900463ffffffff1663ffffffff168363ffffffff16111561114057600080fd5b60008363ffffffff161161115357600080fd5b600360089054906101000a900463ffffffff1663ffffffff168263ffffffff16111561117e57600080fd5b82600360006101000a81548163ffffffff021916908363ffffffff16021790555081600360046101000a81548163ffffffff021916908363ffffffff160217905550600360089054906101000a900463ffffffff1663ffffffff16600360049054906101000a900463ffffffff1663ffffffff16600360009054906101000a900463ffffffff1663ffffffff167fe77378573ac0f86c7fa8dd116b1fa17cf9c328a09a0c56a2c42d786103ac5bc360405160405180910390a46001905092915050565b6005818154811061125157600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60046020528060005260406000206000915054906101000a900460ff1681565b600360089054906101000a900463ffffffff1681565b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611344576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133b906125f6565b60405180910390fd5b60008060008463ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460000b60000b146113f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e990612662565b60405180910390fd5b6000600160008463ffffffff1663ffffffff168152602001908152602001600020905060018160040160009054906101000a900460ff1660ff161461143657600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000808360030160149054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360000b60ff16021790555080600301601c81819054906101000a900463ffffffff16809291906115059061257e565b91906101000a81548163ffffffff021916908363ffffffff160217905550506115418160030160149054906101000a900463ffffffff16611a93565b5080600301601c9054906101000a900463ffffffff16915050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160e906125f6565b60405180910390fd5b60001515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146116aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a1906126ce565b60405180910390fd5b6001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506003600881819054906101000a900463ffffffff16809291906117249061257e565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f6ff3aa2ea7b53070f6d9d07a445d338d89e8edef44250ffa8be19f53910d4a2e8260405161177291906122ed565b60405180910390a1600360089054906101000a900463ffffffff169050919050565b60008060016000600260149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020019081526020016000209050600260149054906101000a900463ffffffff168160030160146101000a81548163ffffffff021916908363ffffffff160217905550848160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550858160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082816000018190555060018160040160006101000a81548160ff021916908360ff1602179055506002601c81819054906101000a900463ffffffff16809291906119119061257e565b91906101000a81548163ffffffff021916908363ffffffff160217905550506002601481819054906101000a900463ffffffff16809291906119529061257e565b91906101000a81548163ffffffff021916908363ffffffff160217905550508060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f3ba7a259b57ae3d653287762394374c856528591f691ecd6494021fdcea00f2484600001548560030160149054906101000a900463ffffffff16604051611a6b929190612783565b60405180910390a48060030160149054906101000a900463ffffffff16915050949350505050565b6000806000600160008563ffffffff1663ffffffff168152602001908152602001600020905060018160040160009054906101000a900460ff1660ff161015611ae0578192505050611e31565b600360009054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff1610611bcf5760028160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff16021790555080600301601c9054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff168260030160149054906101000a900463ffffffff1663ffffffff167f7a17acca3819c1012204b2d019c0ee13bb7e5cf151111030329219582ba83f3160405160405180910390a460019150611e2b565b6000600360049054906101000a900463ffffffff1663ffffffff16118015611c295750600360049054906101000a900463ffffffff1663ffffffff1681600301601c9054906101000a900463ffffffff1663ffffffff1610155b15611d025760048160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff160217905550611c7b8160030160149054906101000a900463ffffffff16611e36565b5080600301601c9054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff168260030160149054906101000a900463ffffffff1663ffffffff167f4bdd2d0e6caefafbf833eda0d32f2dcb0e7a621e3e7b87b2a17c12090edbc0d660405160405180910390a460019150611e2a565b600360009054906101000a900463ffffffff1663ffffffff1681600301601c9054906101000a900463ffffffff16600360089054906101000a900463ffffffff16611d4d919061239e565b63ffffffff161015611e295760048160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff160217905550611da68160030160149054906101000a900463ffffffff16611e36565b5080600301601c9054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff168260030160149054906101000a900463ffffffff1663ffffffff167f3c478de516aa199022ddcd594a6e3b7f03a3e23bfcafd6143adceb687a8e38ea60405160405180910390a4600191505b5b5b81925050505b919050565b60006002601c81819054906101000a900463ffffffff1680929190611e5a9061275a565b91906101000a81548163ffffffff021916908363ffffffff1602179055505060006002601c9054906101000a900463ffffffff1663ffffffff161115611f3c57600260189054906101000a900463ffffffff1663ffffffff168263ffffffff1603611f37576000611ecb6000610a12565b905060008163ffffffff1603611f1357600260149054906101000a900463ffffffff16600260186101000a81548163ffffffff021916908363ffffffff160217905550611f35565b80600260186101000a81548163ffffffff021916908363ffffffff1602179055505b505b611fa8565b600260149054906101000a900463ffffffff1663ffffffff16600260189054906101000a900463ffffffff1663ffffffff1614611fa757600260149054906101000a900463ffffffff16600260186101000a81548163ffffffff021916908363ffffffff1602179055505b5b600260189054906101000a900463ffffffff169050919050565b600063ffffffff82169050919050565b611fdb81611fc2565b82525050565b6000602082019050611ff66000830184611fd2565b92915050565b600080fd5b61200a81611fc2565b811461201557600080fd5b50565b60008135905061202781612001565b92915050565b60006020828403121561204357612042611ffc565b5b600061205184828501612018565b91505092915050565b6000819050919050565b61206d8161205a565b82525050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061209e82612073565b9050919050565b6120ae81612093565b82525050565b600060ff82169050919050565b6120ca816120b4565b82525050565b6000610100820190506120e6600083018b612064565b6120f3602083018a6120a5565b61210060408301896120a5565b61210d60608301886120a5565b61211a6080830187611fd2565b61212760a0830186611fd2565b61213460c0830185611fd2565b61214160e08301846120c1565b9998505050505050505050565b60008115159050919050565b6121638161214e565b82525050565b600060208201905061217e600083018461215a565b92915050565b61218d81612093565b811461219857600080fd5b50565b6000813590506121aa81612184565b92915050565b6000602082840312156121c6576121c5611ffc565b5b60006121d48482850161219b565b91505092915050565b600080604083850312156121f4576121f3611ffc565b5b600061220285828601612018565b92505060206122138582860161219b565b9150509250929050565b60008160000b9050919050565b6122338161221d565b82525050565b600060208201905061224e600083018461222a565b92915050565b6000806040838503121561226b5761226a611ffc565b5b600061227985828601612018565b925050602061228a85828601612018565b9150509250929050565b61229d8161205a565b81146122a857600080fd5b50565b6000813590506122ba81612294565b92915050565b6000602082840312156122d6576122d5611ffc565b5b60006122e4848285016122ab565b91505092915050565b600060208201905061230260008301846120a5565b92915050565b6000806000806080858703121561232257612321611ffc565b5b60006123308782880161219b565b94505060206123418782880161219b565b93505060406123528782880161219b565b9250506060612363878288016122ab565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006123a982611fc2565b91506123b483611fc2565b9250828203905063ffffffff8111156123d0576123cf61236f565b5b92915050565b600082825260208201905092915050565b7f4552525f494e56414c49445f5245515545535400000000000000000000000000600082015250565b600061241d6013836123d6565b9150612428826123e7565b602082019050919050565b6000602082019050818103600083015261244c81612410565b9050919050565b7f4552525f4e4f545f454e444f5253454400000000000000000000000000000000600082015250565b60006124896010836123d6565b915061249482612453565b602082019050919050565b600060208201905081810360008301526124b88161247c565b9050919050565b60006060820190506124d460008301866120a5565b6124e160208301856120a5565b6124ee6040830184612064565b949350505050565b600081519050919050565b600081905092915050565b60005b8381101561252a57808201518184015260208101905061250f565b60008484015250505050565b6000612541826124f6565b61254b8185612501565b935061255b81856020860161250c565b80840191505092915050565b60006125738284612536565b915081905092915050565b600061258982611fc2565b915063ffffffff820361259f5761259e61236f565b5b600182019050919050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b60006125e0600a836123d6565b91506125eb826125aa565b602082019050919050565b6000602082019050818103600083015261260f816125d3565b9050919050565b7f4552525f414c5245414459564f54454400000000000000000000000000000000600082015250565b600061264c6010836123d6565b915061265782612616565b602082019050919050565b6000602082019050818103600083015261267b8161263f565b9050919050565b7f4552525f4e4f54464f554e440000000000000000000000000000000000000000600082015250565b60006126b8600c836123d6565b91506126c382612682565b602082019050919050565b600060208201905081810360008301526126e7816126ab565b9050919050565b7f4552525f5245445543455f5448524553484f4c445f4649525354000000000000600082015250565b6000612724601a836123d6565b915061272f826126ee565b602082019050919050565b6000602082019050818103600083015261275381612717565b9050919050565b600061276582611fc2565b9150600082036127785761277761236f565b5b600182039050919050565b60006040820190506127986000830185612064565b6127a56020830184611fd2565b939250505056fea264697066735822122051384da6a8d08f8929bf33cc3c666da3d5d0af0963d13da84cfca3e503ece63264736f6c63430008110033
+\ No newline at end of file
diff --git a/python/erc20_transfer_authorization/transfer_authorization.py b/python/erc20_transfer_authorization/transfer_authorization.py
@@ -107,6 +107,14 @@ class TransferAuthorization(TxFactory):
return self.call_noarg('signerCount', *args, **kwargs)
+ def last_serial(self, *args, **kwargs):
+ return self.call_noarg('lastSerial', *args, **kwargs)
+
+
+ def next_serial(self, *args, **kwargs):
+ return self.call_noarg('nextSerial', *args, **kwargs)
+
+
@staticmethod
def abi():
if TransferAuthorization.__abi == None:
diff --git a/python/requirements.txt b/python/requirements.txt
@@ -1,4 +1,3 @@
confini>=0.5.2,<0.7.0
-#chainlib-eth>=0.1.0b1,<0.2.0
chainlib-eth~=0.4.7
potaahto~=0.1.1
diff --git a/python/tests/test_quorum.py b/python/tests/test_quorum.py
@@ -7,7 +7,6 @@ import logging
from chainlib.eth.nonce import RPCNonceOracle
from chainlib.eth.address import is_same_address
from chainlib.eth.tx import receipt
-#from giftable_erc20_token import GiftableToken
# local imports
from erc20_transfer_authorization import TransferAuthorization
diff --git a/python/tests/test_request.py b/python/tests/test_request.py
@@ -45,12 +45,97 @@ class TestRequest(TestBase):
self.assertEqual(r['status'], 1)
-
def test_basic(self):
+ o = self.c.next_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 0)
+
+ o = self.c.last_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 0)
+
+ (tx_hash_hex, o) = self.c.create_request(self.address, self.accounts[0], self.accounts[9], self.accounts[2], self.token_address, 1)
+ self.rpc.do(o)
+
+ (tx_hash_hex, o) = self.c.create_request(self.address, self.accounts[0], self.accounts[9], self.accounts[3], self.token_address, 2)
+ self.rpc.do(o)
+
+ o = self.c.last_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 2)
+
+ o = self.c.next_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 1)
+
+ (tx_hash_hex, o) = self.c.yay(self.address, self.accounts[0], 1)
+ self.rpc.do(o)
+
+ (tx_hash_hex, o) = self.c.check_result(self.address, self.accounts[0], 1)
+ self.rpc.do(o)
+
+ (tx_hash_hex, o) = self.c.execute_request(self.address, self.accounts[0], 1)
+ self.rpc.do(o)
+ o = receipt(tx_hash_hex)
+ r = self.rpc.do(o)
+ self.assertEqual(r['status'], 1)
+
+ o = self.c.count(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ count = self.c.parse_count(r)
+ self.assertEqual(count, 1)
+
+ o = self.c.last_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 2)
+
+ o = self.c.next_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 2)
+
+ (tx_hash_hex, o) = self.c.nay(self.address, self.accounts[0], 2)
+ self.rpc.do(o)
+
+ (tx_hash_hex, o) = self.c.check_result(self.address, self.accounts[0], 2)
+ self.rpc.do(o)
+
+ o = self.c.count(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ count = self.c.parse_count(r)
+ self.assertEqual(count, 0)
+
+ o = self.c.last_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 2)
+
+ o = self.c.next_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 0)
+
+
+ def test_hi_lo(self):
for i in range(5):
(tx_hash_hex, o) = self.c.create_request(self.address, self.accounts[0], self.accounts[9], self.accounts[i+1], self.token_address, i+1)
self.rpc.do(o)
+ o = self.c.last_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 5)
+
+ o = self.c.next_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 1)
+
(tx_hash_hex, o) = self.c.yay(self.address, self.accounts[0], 6)
self.rpc.do(o)
o = receipt(tx_hash_hex)
@@ -66,6 +151,16 @@ class TestRequest(TestBase):
(tx_hash_hex, o) = self.c.execute_request(self.address, self.accounts[0], 5)
self.rpc.do(o)
+ o = self.c.last_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 5)
+
+ o = self.c.next_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 1)
+
o = self.c.requests(self.address, 5, sender_address=self.accounts[0])
r = self.rpc.do(o)
request = self.c.parse_request(r)
@@ -84,6 +179,15 @@ class TestRequest(TestBase):
count = self.c.parse_count(r)
self.assertEqual(count, 5)
+ o = self.c.last_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 6)
+
+ o = self.c.next_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 1)
(tx_hash_hex, o) = self.c.yay(self.address, self.accounts[0], 6)
self.rpc.do(o)
@@ -99,6 +203,16 @@ class TestRequest(TestBase):
request = self.c.parse_request(r)
self.assertTrue(request.is_executed())
+ o = self.c.last_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 6)
+
+ o = self.c.next_serial(self.address, sender_address=self.accounts[0])
+ r = self.rpc.do(o)
+ serial = self.c.parse_count(r)
+ self.assertEqual(serial, 1)
+
c = ERC20(self.chain_spec)
o = c.balance(self.token_address, self.accounts[0], sender_address=self.accounts[0])
r = self.rpc.do(o)
diff --git a/solidity/ERC20TransferAuthorization.sol b/solidity/ERC20TransferAuthorization.sol
@@ -125,7 +125,7 @@ contract ERC20TransferAuthorization {
lo = i;
}
}
- } else {
+ } else if (lo != hi) {
lo = hi;
}
@@ -140,6 +140,13 @@ contract ERC20TransferAuthorization {
// index of oldest unfinished vote
function nextSerial() public view returns ( uint32 ) {
if (hi - lo == 0) {
+ if (hi == 1) {
+ return 0;
+ }
+ Transaction storage txx = requests[lo];
+ if (txx.result > 0) {
+ return lo;
+ }
return 0;
}
return lo;
@@ -150,7 +157,7 @@ contract ERC20TransferAuthorization {
uint32 i;
for (uint32 j = lo; j < hi; j++) {
Transaction storage txx = requests[j];
- if (txx.result > 0) {
+ if (txx.result & 7 == 1) {
if (i == _idx) {
return txx.serial;
}
@@ -228,7 +235,7 @@ contract ERC20TransferAuthorization {
Transaction storage txx = requests[_serial];
require(txx.serial > 0, 'ERR_INVALID_REQUEST');
- require(txx.result == 3, 'ERR_NOT_ENDORSED');
+ require(txx.result & 11 == 3, 'ERR_NOT_ENDORSED');
removeItem(txx.serial);
txx.result |= 8;