commit 1b7286306f7622f438b2e3443929a04c96ac3a24 parent ce726994c8dcb8a78a515f84675a371143464fa8 Author: lash <dev@holbrook.no> Date: Sat, 10 Dec 2022 21:34:31 +0000 Add shuffled requests cherrypicking test Diffstat:
M | python/erc20_transfer_authorization/data/ERC20TransferAuthorization.bin | | | 4 | ++-- |
M | python/tests/base_erc20transferauthorization.py | | | 4 | ---- |
M | python/tests/test_request.py | | | 45 | ++++++++++++++++++++++++++++++++++++++++++++- |
M | solidity/ERC20TransferAuthorization.sol | | | 9 | +++++++-- |
4 files changed, 53 insertions(+), 9 deletions(-)
diff --git a/python/erc20_transfer_authorization/data/ERC20TransferAuthorization.bin b/python/erc20_transfer_authorization/data/ERC20TransferAuthorization.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b5033600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260146101000a81548163ffffffff021916908363ffffffff1602179055506001600260186101000a81548163ffffffff021916908363ffffffff160217905550620000b133620000d6640100000000026401000000009004565b50620000cf60016000620002ef640100000000026401000000009004565b50620005e7565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200016b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001629062000481565b60405180910390fd5b60001515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151462000201576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001f890620004f3565b60405180910390fd5b6001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506003600881819054906101000a900463ffffffff16809291906200027d9062000554565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f6ff3aa2ea7b53070f6d9d07a445d338d89e8edef44250ffa8be19f53910d4a2e82604051620002cd9190620005ca565b60405180910390a1600360089054906101000a900463ffffffff169050919050565b6000600360089054906101000a900463ffffffff1663ffffffff168363ffffffff1611156200031d57600080fd5b60008363ffffffff16116200033157600080fd5b600360089054906101000a900463ffffffff1663ffffffff168263ffffffff1611156200035d57600080fd5b82600360006101000a81548163ffffffff021916908363ffffffff16021790555081600360046101000a81548163ffffffff021916908363ffffffff160217905550600360089054906101000a900463ffffffff1663ffffffff16600360049054906101000a900463ffffffff1663ffffffff16600360009054906101000a900463ffffffff1663ffffffff167fe77378573ac0f86c7fa8dd116b1fa17cf9c328a09a0c56a2c42d786103ac5bc360405160405180910390a46001905092915050565b600082825260208201905092915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b600062000469600a8362000420565b9150620004768262000431565b602082019050919050565b600060208201905081810360008301526200049c816200045a565b9050919050565b7f4552525f4e4f54464f554e440000000000000000000000000000000000000000600082015250565b6000620004db600c8362000420565b9150620004e882620004a3565b602082019050919050565b600060208201905081810360008301526200050e81620004cc565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff82169050919050565b6000620005618262000544565b915063ffffffff82036200057a576200057962000515565b5b600182019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620005b28262000585565b9050919050565b620005c481620005a5565b82525050565b6000602082019050620005e16000830184620005b9565b92915050565b6127e280620005f76000396000f3fe608060405234801561001057600080fd5b5060043610610154576000357c010000000000000000000000000000000000000000000000000000000090048063614f427f116100d55780637ca548c6116100995780637ca548c6146103d65780637f4dbec1146103f45780638da5cb5b14610424578063da2824a814610442578063ed71262a14610472578063fdd33d68146104a257610154565b8063614f427f146102f8578063655c013114610316578063669cd53b1461034657806366a5267214610376578063736c0d5b146103a657610154565b80631703a0181161011c5780631703a0181461022c5780632b29ba231461024a578063476ce3ad1461027a5780635356dddc146102aa57806357ec347a146102da57610154565b806306661abd1461015957806308ae6377146101775780630ab469b0146101955780630ac94000146101cc57806310858c67146101fc575b600080fd5b6101616104d2565b60405161016e9190611fe1565b60405180910390f35b61017f6104e8565b60405161018c9190611fe1565b60405180910390f35b6101af60048036038101906101aa919061202d565b6105df565b6040516101c39897969594939291906120d0565b60405180910390f35b6101e660048036038101906101e1919061202d565b6106c4565b6040516101f39190612169565b60405180910390f35b6102166004803603810190610211919061202d565b610a12565b6040516102239190611fe1565b60405180910390f35b610234610af6565b6040516102419190611fe1565b60405180910390f35b610264600480360381019061025f91906121b0565b610b0c565b6040516102719190612169565b60405180910390f35b610294600480360381019061028f919061202d565b610b62565b6040516102a19190611fe1565b60405180910390f35b6102c460048036038101906102bf91906121b0565b610dec565b6040516102d19190611fe1565b60405180910390f35b6102e26110a8565b6040516102ef9190611fe1565b60405180910390f35b6103006110ce565b60405161030d9190611fe1565b60405180910390f35b610330600480360381019061032b91906121dd565b6110e4565b60405161033d9190612239565b60405180910390f35b610360600480360381019061035b9190612254565b611113565b60405161036d9190612169565b60405180910390f35b610390600480360381019061038b91906122c0565b611241565b60405161039d91906122ed565b60405180910390f35b6103c060048036038101906103bb91906121b0565b611280565b6040516103cd9190612169565b60405180910390f35b6103de6112a0565b6040516103eb9190611fe1565b60405180910390f35b61040e6004803603810190610409919061202d565b6112b6565b60405161041b9190611fe1565b60405180910390f35b61042c61155f565b60405161043991906122ed565b60405180910390f35b61045c600480360381019061045791906121b0565b611585565b6040516104699190611fe1565b60405180910390f35b61048c60048036038101906104879190612308565b611794565b6040516104999190611fe1565b60405180910390f35b6104bc60048036038101906104b7919061202d565b611a93565b6040516104c99190612169565b60405180910390f35b6002601c9054906101000a900463ffffffff1681565b600080600260189054906101000a900463ffffffff16600260149054906101000a900463ffffffff1661051b919061239e565b63ffffffff16036105c6576001600260149054906101000a900463ffffffff1663ffffffff160361054f57600090506105dc565b600060016000600260189054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001908152602001600020905060008160040160009054906101000a900460ff1660ff1611156105bc57600260189054906101000a900463ffffffff169150506105dc565b60009150506105dc565b600260189054906101000a900463ffffffff1690505b90565b60016020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160149054906101000a900463ffffffff16908060030160189054906101000a900463ffffffff169080600301601c9054906101000a900463ffffffff16908060040160009054906101000a900460ff16905088565b600080600160008463ffffffff1663ffffffff168152602001908152602001600020905060008160030160149054906101000a900463ffffffff1663ffffffff1611610745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073c90612433565b60405180910390fd5b6003600b8260040160009054906101000a900460ff161660ff161461079f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107969061249f565b60405180910390fd5b6107bc8160030160149054906101000a900463ffffffff16611e36565b5060088160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff1602179055506000808260030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168460020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856000015460405160240161088c939291906124bf565b6040516020818303038152906040527f23b872dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516109169190612567565b6000604051808303816000865af19150503d8060008114610953576040519150601f19603f3d011682016040523d82523d6000602084013e610958565b606091505b5091509150811561099f577fa80d5e3445b11533e6c584c506299aa14168f2ad1fe65b0266e7d622c5461c30856040516109929190611fe1565b60405180910390a1610a07565b60108360040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff1602179055507f8f15e24c8a8ecaa6b067f0cd2c220532e6496f53b2ac3263129d1496cb6f192e856040516109fe9190611fe1565b60405180910390a15b819350505050919050565b6000806000600260189054906101000a900463ffffffff1690505b600260149054906101000a900463ffffffff1663ffffffff168163ffffffff161015610aea576000600160008363ffffffff1663ffffffff1681526020019081526020016000209050600160078260040160009054906101000a900460ff161660ff1603610ad6578463ffffffff168363ffffffff1603610ac7578060030160149054906101000a900463ffffffff169350505050610af1565b8280610ad29061257e565b9350505b508080610ae29061257e565b915050610a2d565b5060009150505b919050565b600360009054906101000a900463ffffffff1681565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610bf0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be7906125f6565b60405180910390fd5b60008060008463ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460000b60000b14610c9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9590612662565b60405180910390fd5b6000600160008463ffffffff1663ffffffff168152602001908152602001600020905060018160040160009054906101000a900460ff1660ff1614610ce257600080fd5b60016000808360030160149054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360000b60ff16021790555080600301601881819054906101000a900463ffffffff1680929190610d929061257e565b91906101000a81548163ffffffff021916908363ffffffff16021790555050610dce8160030160149054906101000a900463ffffffff16611a93565b508060030160189054906101000a900463ffffffff16915050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e75906125f6565b60405180910390fd5b60011515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610f11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f08906126ce565b60405180910390fd5b600360009054906101000a900463ffffffff1663ffffffff16600360089054906101000a900463ffffffff1663ffffffff16118015610f7f5750600360049054906101000a900463ffffffff1663ffffffff16600360089054906101000a900463ffffffff1663ffffffff16115b610fbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb59061273a565b60405180910390fd5b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506003600881819054906101000a900463ffffffff16809291906110389061275a565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f86e5bbceda94081c32220d685f37cc4e3ea7bb0be2dfbf0cb703579505a5390e8260405161108691906122ed565b60405180910390a1600360089054906101000a900463ffffffff169050919050565b60006001600260149054906101000a900463ffffffff166110c9919061239e565b905090565b600360049054906101000a900463ffffffff1681565b60006020528160005260406000206020528060005260406000206000915091509054906101000a900460000b81565b6000600360089054906101000a900463ffffffff1663ffffffff168363ffffffff16111561114057600080fd5b60008363ffffffff161161115357600080fd5b600360089054906101000a900463ffffffff1663ffffffff168263ffffffff16111561117e57600080fd5b82600360006101000a81548163ffffffff021916908363ffffffff16021790555081600360046101000a81548163ffffffff021916908363ffffffff160217905550600360089054906101000a900463ffffffff1663ffffffff16600360049054906101000a900463ffffffff1663ffffffff16600360009054906101000a900463ffffffff1663ffffffff167fe77378573ac0f86c7fa8dd116b1fa17cf9c328a09a0c56a2c42d786103ac5bc360405160405180910390a46001905092915050565b6005818154811061125157600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60046020528060005260406000206000915054906101000a900460ff1681565b600360089054906101000a900463ffffffff1681565b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611344576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133b906125f6565b60405180910390fd5b60008060008463ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460000b60000b146113f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e990612662565b60405180910390fd5b6000600160008463ffffffff1663ffffffff168152602001908152602001600020905060018160040160009054906101000a900460ff1660ff161461143657600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000808360030160149054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360000b60ff16021790555080600301601c81819054906101000a900463ffffffff16809291906115059061257e565b91906101000a81548163ffffffff021916908363ffffffff160217905550506115418160030160149054906101000a900463ffffffff16611a93565b5080600301601c9054906101000a900463ffffffff16915050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611617576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160e906125f6565b60405180910390fd5b60001515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146116aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a1906126ce565b60405180910390fd5b6001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506003600881819054906101000a900463ffffffff16809291906117249061257e565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f6ff3aa2ea7b53070f6d9d07a445d338d89e8edef44250ffa8be19f53910d4a2e8260405161177291906122ed565b60405180910390a1600360089054906101000a900463ffffffff169050919050565b60008060016000600260149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020019081526020016000209050600260149054906101000a900463ffffffff168160030160146101000a81548163ffffffff021916908363ffffffff160217905550848160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550858160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082816000018190555060018160040160006101000a81548160ff021916908360ff1602179055506002601c81819054906101000a900463ffffffff16809291906119119061257e565b91906101000a81548163ffffffff021916908363ffffffff160217905550506002601481819054906101000a900463ffffffff16809291906119529061257e565b91906101000a81548163ffffffff021916908363ffffffff160217905550508060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f3ba7a259b57ae3d653287762394374c856528591f691ecd6494021fdcea00f2484600001548560030160149054906101000a900463ffffffff16604051611a6b929190612783565b60405180910390a48060030160149054906101000a900463ffffffff16915050949350505050565b6000806000600160008563ffffffff1663ffffffff168152602001908152602001600020905060018160040160009054906101000a900460ff1660ff161015611ae0578192505050611e31565b600360009054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff1610611bcf5760028160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff16021790555080600301601c9054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff168260030160149054906101000a900463ffffffff1663ffffffff167f7a17acca3819c1012204b2d019c0ee13bb7e5cf151111030329219582ba83f3160405160405180910390a460019150611e2b565b6000600360049054906101000a900463ffffffff1663ffffffff16118015611c295750600360049054906101000a900463ffffffff1663ffffffff1681600301601c9054906101000a900463ffffffff1663ffffffff1610155b15611d025760048160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff160217905550611c7b8160030160149054906101000a900463ffffffff16611e36565b5080600301601c9054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff168260030160149054906101000a900463ffffffff1663ffffffff167f4bdd2d0e6caefafbf833eda0d32f2dcb0e7a621e3e7b87b2a17c12090edbc0d660405160405180910390a460019150611e2a565b600360009054906101000a900463ffffffff1663ffffffff1681600301601c9054906101000a900463ffffffff16600360089054906101000a900463ffffffff16611d4d919061239e565b63ffffffff161015611e295760048160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff160217905550611da68160030160149054906101000a900463ffffffff16611e36565b5080600301601c9054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff168260030160149054906101000a900463ffffffff1663ffffffff167f3c478de516aa199022ddcd594a6e3b7f03a3e23bfcafd6143adceb687a8e38ea60405160405180910390a4600191505b5b5b81925050505b919050565b60006002601c81819054906101000a900463ffffffff1680929190611e5a9061275a565b91906101000a81548163ffffffff021916908363ffffffff1602179055505060006002601c9054906101000a900463ffffffff1663ffffffff161115611f3c57600260189054906101000a900463ffffffff1663ffffffff168263ffffffff1603611f37576000611ecb6000610a12565b905060008163ffffffff1603611f1357600260149054906101000a900463ffffffff16600260186101000a81548163ffffffff021916908363ffffffff160217905550611f35565b80600260186101000a81548163ffffffff021916908363ffffffff1602179055505b505b611fa8565b600260149054906101000a900463ffffffff1663ffffffff16600260189054906101000a900463ffffffff1663ffffffff1614611fa757600260149054906101000a900463ffffffff16600260186101000a81548163ffffffff021916908363ffffffff1602179055505b5b600260189054906101000a900463ffffffff169050919050565b600063ffffffff82169050919050565b611fdb81611fc2565b82525050565b6000602082019050611ff66000830184611fd2565b92915050565b600080fd5b61200a81611fc2565b811461201557600080fd5b50565b60008135905061202781612001565b92915050565b60006020828403121561204357612042611ffc565b5b600061205184828501612018565b91505092915050565b6000819050919050565b61206d8161205a565b82525050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061209e82612073565b9050919050565b6120ae81612093565b82525050565b600060ff82169050919050565b6120ca816120b4565b82525050565b6000610100820190506120e6600083018b612064565b6120f3602083018a6120a5565b61210060408301896120a5565b61210d60608301886120a5565b61211a6080830187611fd2565b61212760a0830186611fd2565b61213460c0830185611fd2565b61214160e08301846120c1565b9998505050505050505050565b60008115159050919050565b6121638161214e565b82525050565b600060208201905061217e600083018461215a565b92915050565b61218d81612093565b811461219857600080fd5b50565b6000813590506121aa81612184565b92915050565b6000602082840312156121c6576121c5611ffc565b5b60006121d48482850161219b565b91505092915050565b600080604083850312156121f4576121f3611ffc565b5b600061220285828601612018565b92505060206122138582860161219b565b9150509250929050565b60008160000b9050919050565b6122338161221d565b82525050565b600060208201905061224e600083018461222a565b92915050565b6000806040838503121561226b5761226a611ffc565b5b600061227985828601612018565b925050602061228a85828601612018565b9150509250929050565b61229d8161205a565b81146122a857600080fd5b50565b6000813590506122ba81612294565b92915050565b6000602082840312156122d6576122d5611ffc565b5b60006122e4848285016122ab565b91505092915050565b600060208201905061230260008301846120a5565b92915050565b6000806000806080858703121561232257612321611ffc565b5b60006123308782880161219b565b94505060206123418782880161219b565b93505060406123528782880161219b565b9250506060612363878288016122ab565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006123a982611fc2565b91506123b483611fc2565b9250828203905063ffffffff8111156123d0576123cf61236f565b5b92915050565b600082825260208201905092915050565b7f4552525f494e56414c49445f5245515545535400000000000000000000000000600082015250565b600061241d6013836123d6565b9150612428826123e7565b602082019050919050565b6000602082019050818103600083015261244c81612410565b9050919050565b7f4552525f4e4f545f454e444f5253454400000000000000000000000000000000600082015250565b60006124896010836123d6565b915061249482612453565b602082019050919050565b600060208201905081810360008301526124b88161247c565b9050919050565b60006060820190506124d460008301866120a5565b6124e160208301856120a5565b6124ee6040830184612064565b949350505050565b600081519050919050565b600081905092915050565b60005b8381101561252a57808201518184015260208101905061250f565b60008484015250505050565b6000612541826124f6565b61254b8185612501565b935061255b81856020860161250c565b80840191505092915050565b60006125738284612536565b915081905092915050565b600061258982611fc2565b915063ffffffff820361259f5761259e61236f565b5b600182019050919050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b60006125e0600a836123d6565b91506125eb826125aa565b602082019050919050565b6000602082019050818103600083015261260f816125d3565b9050919050565b7f4552525f414c5245414459564f54454400000000000000000000000000000000600082015250565b600061264c6010836123d6565b915061265782612616565b602082019050919050565b6000602082019050818103600083015261267b8161263f565b9050919050565b7f4552525f4e4f54464f554e440000000000000000000000000000000000000000600082015250565b60006126b8600c836123d6565b91506126c382612682565b602082019050919050565b600060208201905081810360008301526126e7816126ab565b9050919050565b7f4552525f5245445543455f5448524553484f4c445f4649525354000000000000600082015250565b6000612724601a836123d6565b915061272f826126ee565b602082019050919050565b6000602082019050818103600083015261275381612717565b9050919050565b600061276582611fc2565b9150600082036127785761277761236f565b5b600182039050919050565b60006040820190506127986000830185612064565b6127a56020830184611fd2565b939250505056fea264697066735822122051384da6a8d08f8929bf33cc3c666da3d5d0af0963d13da84cfca3e503ece63264736f6c63430008110033 -\ No newline at end of file +60806040523480156200001157600080fd5b5033600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260146101000a81548163ffffffff021916908363ffffffff1602179055506001600260186101000a81548163ffffffff021916908363ffffffff160217905550620000b133620000d6640100000000026401000000009004565b50620000cf60016000620002ef640100000000026401000000009004565b50620005e7565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200016b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001629062000481565b60405180910390fd5b60001515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151462000201576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001f890620004f3565b60405180910390fd5b6001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506003600881819054906101000a900463ffffffff16809291906200027d9062000554565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f6ff3aa2ea7b53070f6d9d07a445d338d89e8edef44250ffa8be19f53910d4a2e82604051620002cd9190620005ca565b60405180910390a1600360089054906101000a900463ffffffff169050919050565b6000600360089054906101000a900463ffffffff1663ffffffff168363ffffffff1611156200031d57600080fd5b60008363ffffffff16116200033157600080fd5b600360089054906101000a900463ffffffff1663ffffffff168263ffffffff1611156200035d57600080fd5b82600360006101000a81548163ffffffff021916908363ffffffff16021790555081600360046101000a81548163ffffffff021916908363ffffffff160217905550600360089054906101000a900463ffffffff1663ffffffff16600360049054906101000a900463ffffffff1663ffffffff16600360009054906101000a900463ffffffff1663ffffffff167fe77378573ac0f86c7fa8dd116b1fa17cf9c328a09a0c56a2c42d786103ac5bc360405160405180910390a46001905092915050565b600082825260208201905092915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b600062000469600a8362000420565b9150620004768262000431565b602082019050919050565b600060208201905081810360008301526200049c816200045a565b9050919050565b7f4552525f4e4f54464f554e440000000000000000000000000000000000000000600082015250565b6000620004db600c8362000420565b9150620004e882620004a3565b602082019050919050565b600060208201905081810360008301526200050e81620004cc565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff82169050919050565b6000620005618262000544565b915063ffffffff82036200057a576200057962000515565b5b600182019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620005b28262000585565b9050919050565b620005c481620005a5565b82525050565b6000602082019050620005e16000830184620005b9565b92915050565b61284580620005f76000396000f3fe608060405234801561001057600080fd5b5060043610610154576000357c010000000000000000000000000000000000000000000000000000000090048063614f427f116100d55780637ca548c6116100995780637ca548c6146103d65780637f4dbec1146103f45780638da5cb5b14610424578063da2824a814610442578063ed71262a14610472578063fdd33d68146104a257610154565b8063614f427f146102f8578063655c013114610316578063669cd53b1461034657806366a5267214610376578063736c0d5b146103a657610154565b80631703a0181161011c5780631703a0181461022c5780632b29ba231461024a578063476ce3ad1461027a5780635356dddc146102aa57806357ec347a146102da57610154565b806306661abd1461015957806308ae6377146101775780630ab469b0146101955780630ac94000146101cc57806310858c67146101fc575b600080fd5b6101616104d2565b60405161016e9190612044565b60405180910390f35b61017f6104e8565b60405161018c9190612044565b60405180910390f35b6101af60048036038101906101aa9190612090565b6105df565b6040516101c3989796959493929190612133565b60405180910390f35b6101e660048036038101906101e19190612090565b6106c4565b6040516101f391906121cc565b60405180910390f35b61021660048036038101906102119190612090565b610a12565b6040516102239190612044565b60405180910390f35b610234610b37565b6040516102419190612044565b60405180910390f35b610264600480360381019061025f9190612213565b610b4d565b60405161027191906121cc565b60405180910390f35b610294600480360381019061028f9190612090565b610ba3565b6040516102a19190612044565b60405180910390f35b6102c460048036038101906102bf9190612213565b610e2d565b6040516102d19190612044565b60405180910390f35b6102e26110e9565b6040516102ef9190612044565b60405180910390f35b61030061110f565b60405161030d9190612044565b60405180910390f35b610330600480360381019061032b9190612240565b611125565b60405161033d919061229c565b60405180910390f35b610360600480360381019061035b91906122b7565b611154565b60405161036d91906121cc565b60405180910390f35b610390600480360381019061038b9190612323565b611282565b60405161039d9190612350565b60405180910390f35b6103c060048036038101906103bb9190612213565b6112c1565b6040516103cd91906121cc565b60405180910390f35b6103de6112e1565b6040516103eb9190612044565b60405180910390f35b61040e60048036038101906104099190612090565b6112f7565b60405161041b9190612044565b60405180910390f35b61042c6115a0565b6040516104399190612350565b60405180910390f35b61045c60048036038101906104579190612213565b6115c6565b6040516104699190612044565b60405180910390f35b61048c6004803603810190610487919061236b565b6117d5565b6040516104999190612044565b60405180910390f35b6104bc60048036038101906104b79190612090565b611ad4565b6040516104c991906121cc565b60405180910390f35b6002601c9054906101000a900463ffffffff1681565b600080600260189054906101000a900463ffffffff16600260149054906101000a900463ffffffff1661051b9190612401565b63ffffffff16036105c6576001600260149054906101000a900463ffffffff1663ffffffff160361054f57600090506105dc565b600060016000600260189054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001908152602001600020905060008160040160009054906101000a900460ff1660ff1611156105bc57600260189054906101000a900463ffffffff169150506105dc565b60009150506105dc565b600260189054906101000a900463ffffffff1690505b90565b60016020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160149054906101000a900463ffffffff16908060030160189054906101000a900463ffffffff169080600301601c9054906101000a900463ffffffff16908060040160009054906101000a900460ff16905088565b600080600160008463ffffffff1663ffffffff168152602001908152602001600020905060008160030160149054906101000a900463ffffffff1663ffffffff1611610745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073c90612496565b60405180910390fd5b6003600b8260040160009054906101000a900460ff161660ff161461079f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079690612502565b60405180910390fd5b6107bc8160030160149054906101000a900463ffffffff16611e99565b5060088160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff1602179055506000808260030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168460020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856000015460405160240161088c93929190612522565b6040516020818303038152906040527f23b872dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161091691906125ca565b6000604051808303816000865af19150503d8060008114610953576040519150601f19603f3d011682016040523d82523d6000602084013e610958565b606091505b5091509150811561099f577fa80d5e3445b11533e6c584c506299aa14168f2ad1fe65b0266e7d622c5461c30856040516109929190612044565b60405180910390a1610a07565b60108360040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff1602179055507f8f15e24c8a8ecaa6b067f0cd2c220532e6496f53b2ac3263129d1496cb6f192e856040516109fe9190612044565b60405180910390a15b819350505050919050565b600080600260149054906101000a900463ffffffff1663ffffffff16600260189054906101000a900463ffffffff1663ffffffff1603610a56576000915050610b32565b6000600260189054906101000a900463ffffffff1690505b600260149054906101000a900463ffffffff1663ffffffff168163ffffffff161015610b2b576000600160008363ffffffff1663ffffffff1681526020019081526020016000209050600160078260040160009054906101000a900460ff161660ff1603610b17578463ffffffff168363ffffffff1603610b08578060030160149054906101000a900463ffffffff169350505050610b32565b8280610b13906125e1565b9350505b508080610b23906125e1565b915050610a6e565b5060009150505b919050565b600360009054906101000a900463ffffffff1681565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610c31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2890612659565b60405180910390fd5b60008060008463ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460000b60000b14610cdf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd6906126c5565b60405180910390fd5b6000600160008463ffffffff1663ffffffff168152602001908152602001600020905060018160040160009054906101000a900460ff1660ff1614610d2357600080fd5b60016000808360030160149054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360000b60ff16021790555080600301601881819054906101000a900463ffffffff1680929190610dd3906125e1565b91906101000a81548163ffffffff021916908363ffffffff16021790555050610e0f8160030160149054906101000a900463ffffffff16611ad4565b508060030160189054906101000a900463ffffffff16915050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ebf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eb690612659565b60405180910390fd5b60011515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610f52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4990612731565b60405180910390fd5b600360009054906101000a900463ffffffff1663ffffffff16600360089054906101000a900463ffffffff1663ffffffff16118015610fc05750600360049054906101000a900463ffffffff1663ffffffff16600360089054906101000a900463ffffffff1663ffffffff16115b610fff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff69061279d565b60405180910390fd5b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506003600881819054906101000a900463ffffffff1680929190611079906127bd565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f86e5bbceda94081c32220d685f37cc4e3ea7bb0be2dfbf0cb703579505a5390e826040516110c79190612350565b60405180910390a1600360089054906101000a900463ffffffff169050919050565b60006001600260149054906101000a900463ffffffff1661110a9190612401565b905090565b600360049054906101000a900463ffffffff1681565b60006020528160005260406000206020528060005260406000206000915091509054906101000a900460000b81565b6000600360089054906101000a900463ffffffff1663ffffffff168363ffffffff16111561118157600080fd5b60008363ffffffff161161119457600080fd5b600360089054906101000a900463ffffffff1663ffffffff168263ffffffff1611156111bf57600080fd5b82600360006101000a81548163ffffffff021916908363ffffffff16021790555081600360046101000a81548163ffffffff021916908363ffffffff160217905550600360089054906101000a900463ffffffff1663ffffffff16600360049054906101000a900463ffffffff1663ffffffff16600360009054906101000a900463ffffffff1663ffffffff167fe77378573ac0f86c7fa8dd116b1fa17cf9c328a09a0c56a2c42d786103ac5bc360405160405180910390a46001905092915050565b6005818154811061129257600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60046020528060005260406000206000915054906101000a900460ff1681565b600360089054906101000a900463ffffffff1681565b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611385576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137c90612659565b60405180910390fd5b60008060008463ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460000b60000b14611433576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142a906126c5565b60405180910390fd5b6000600160008463ffffffff1663ffffffff168152602001908152602001600020905060018160040160009054906101000a900460ff1660ff161461147757600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000808360030160149054906101000a900463ffffffff1663ffffffff1663ffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360000b60ff16021790555080600301601c81819054906101000a900463ffffffff1680929190611546906125e1565b91906101000a81548163ffffffff021916908363ffffffff160217905550506115828160030160149054906101000a900463ffffffff16611ad4565b5080600301601c9054906101000a900463ffffffff16915050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611658576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164f90612659565b60405180910390fd5b60001515600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146116eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e290612731565b60405180910390fd5b6001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506003600881819054906101000a900463ffffffff1680929190611765906125e1565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f6ff3aa2ea7b53070f6d9d07a445d338d89e8edef44250ffa8be19f53910d4a2e826040516117b39190612350565b60405180910390a1600360089054906101000a900463ffffffff169050919050565b60008060016000600260149054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020019081526020016000209050600260149054906101000a900463ffffffff168160030160146101000a81548163ffffffff021916908363ffffffff160217905550848160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550858160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082816000018190555060018160040160006101000a81548160ff021916908360ff1602179055506002601c81819054906101000a900463ffffffff1680929190611952906125e1565b91906101000a81548163ffffffff021916908363ffffffff160217905550506002601481819054906101000a900463ffffffff1680929190611993906125e1565b91906101000a81548163ffffffff021916908363ffffffff160217905550508060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f3ba7a259b57ae3d653287762394374c856528591f691ecd6494021fdcea00f2484600001548560030160149054906101000a900463ffffffff16604051611aac9291906127e6565b60405180910390a48060030160149054906101000a900463ffffffff16915050949350505050565b6000806000600160008563ffffffff1663ffffffff168152602001908152602001600020905060018160040160009054906101000a900460ff1660ff161080611b345750600060068260040160009054906101000a900460ff161660ff16115b15611b43578192505050611e94565b600360009054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff1610611c325760028160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff16021790555080600301601c9054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff168260030160149054906101000a900463ffffffff1663ffffffff167f7a17acca3819c1012204b2d019c0ee13bb7e5cf151111030329219582ba83f3160405160405180910390a460019150611e8e565b6000600360049054906101000a900463ffffffff1663ffffffff16118015611c8c5750600360049054906101000a900463ffffffff1663ffffffff1681600301601c9054906101000a900463ffffffff1663ffffffff1610155b15611d655760048160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff160217905550611cde8160030160149054906101000a900463ffffffff16611e99565b5080600301601c9054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff168260030160149054906101000a900463ffffffff1663ffffffff167f4bdd2d0e6caefafbf833eda0d32f2dcb0e7a621e3e7b87b2a17c12090edbc0d660405160405180910390a460019150611e8d565b600360009054906101000a900463ffffffff1663ffffffff1681600301601c9054906101000a900463ffffffff16600360089054906101000a900463ffffffff16611db09190612401565b63ffffffff161015611e8c5760048160040160008282829054906101000a900460ff161792506101000a81548160ff021916908360ff160217905550611e098160030160149054906101000a900463ffffffff16611e99565b5080600301601c9054906101000a900463ffffffff1663ffffffff168160030160189054906101000a900463ffffffff1663ffffffff168260030160149054906101000a900463ffffffff1663ffffffff167f3c478de516aa199022ddcd594a6e3b7f03a3e23bfcafd6143adceb687a8e38ea60405160405180910390a4600191505b5b5b81925050505b919050565b60006002601c81819054906101000a900463ffffffff1680929190611ebd906127bd565b91906101000a81548163ffffffff021916908363ffffffff1602179055505060006002601c9054906101000a900463ffffffff1663ffffffff161115611f9f57600260189054906101000a900463ffffffff1663ffffffff168263ffffffff1603611f9a576000611f2e6000610a12565b905060008163ffffffff1603611f7657600260149054906101000a900463ffffffff16600260186101000a81548163ffffffff021916908363ffffffff160217905550611f98565b80600260186101000a81548163ffffffff021916908363ffffffff1602179055505b505b61200b565b600260149054906101000a900463ffffffff1663ffffffff16600260189054906101000a900463ffffffff1663ffffffff161461200a57600260149054906101000a900463ffffffff16600260186101000a81548163ffffffff021916908363ffffffff1602179055505b5b600260189054906101000a900463ffffffff169050919050565b600063ffffffff82169050919050565b61203e81612025565b82525050565b60006020820190506120596000830184612035565b92915050565b600080fd5b61206d81612025565b811461207857600080fd5b50565b60008135905061208a81612064565b92915050565b6000602082840312156120a6576120a561205f565b5b60006120b48482850161207b565b91505092915050565b6000819050919050565b6120d0816120bd565b82525050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612101826120d6565b9050919050565b612111816120f6565b82525050565b600060ff82169050919050565b61212d81612117565b82525050565b600061010082019050612149600083018b6120c7565b612156602083018a612108565b6121636040830189612108565b6121706060830188612108565b61217d6080830187612035565b61218a60a0830186612035565b61219760c0830185612035565b6121a460e0830184612124565b9998505050505050505050565b60008115159050919050565b6121c6816121b1565b82525050565b60006020820190506121e160008301846121bd565b92915050565b6121f0816120f6565b81146121fb57600080fd5b50565b60008135905061220d816121e7565b92915050565b6000602082840312156122295761222861205f565b5b6000612237848285016121fe565b91505092915050565b600080604083850312156122575761225661205f565b5b60006122658582860161207b565b9250506020612276858286016121fe565b9150509250929050565b60008160000b9050919050565b61229681612280565b82525050565b60006020820190506122b1600083018461228d565b92915050565b600080604083850312156122ce576122cd61205f565b5b60006122dc8582860161207b565b92505060206122ed8582860161207b565b9150509250929050565b612300816120bd565b811461230b57600080fd5b50565b60008135905061231d816122f7565b92915050565b6000602082840312156123395761233861205f565b5b60006123478482850161230e565b91505092915050565b60006020820190506123656000830184612108565b92915050565b600080600080608085870312156123855761238461205f565b5b6000612393878288016121fe565b94505060206123a4878288016121fe565b93505060406123b5878288016121fe565b92505060606123c68782880161230e565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061240c82612025565b915061241783612025565b9250828203905063ffffffff811115612433576124326123d2565b5b92915050565b600082825260208201905092915050565b7f4552525f494e56414c49445f5245515545535400000000000000000000000000600082015250565b6000612480601383612439565b915061248b8261244a565b602082019050919050565b600060208201905081810360008301526124af81612473565b9050919050565b7f4552525f4e4f545f454e444f5253454400000000000000000000000000000000600082015250565b60006124ec601083612439565b91506124f7826124b6565b602082019050919050565b6000602082019050818103600083015261251b816124df565b9050919050565b60006060820190506125376000830186612108565b6125446020830185612108565b61255160408301846120c7565b949350505050565b600081519050919050565b600081905092915050565b60005b8381101561258d578082015181840152602081019050612572565b60008484015250505050565b60006125a482612559565b6125ae8185612564565b93506125be81856020860161256f565b80840191505092915050565b60006125d68284612599565b915081905092915050565b60006125ec82612025565b915063ffffffff8203612602576126016123d2565b5b600182019050919050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b6000612643600a83612439565b915061264e8261260d565b602082019050919050565b6000602082019050818103600083015261267281612636565b9050919050565b7f4552525f414c5245414459564f54454400000000000000000000000000000000600082015250565b60006126af601083612439565b91506126ba82612679565b602082019050919050565b600060208201905081810360008301526126de816126a2565b9050919050565b7f4552525f4e4f54464f554e440000000000000000000000000000000000000000600082015250565b600061271b600c83612439565b9150612726826126e5565b602082019050919050565b6000602082019050818103600083015261274a8161270e565b9050919050565b7f4552525f5245445543455f5448524553484f4c445f4649525354000000000000600082015250565b6000612787601a83612439565b915061279282612751565b602082019050919050565b600060208201905081810360008301526127b68161277a565b9050919050565b60006127c882612025565b9150600082036127db576127da6123d2565b5b600182039050919050565b60006040820190506127fb60008301856120c7565b6128086020830184612035565b939250505056fea26469706673582212202cc5839cf3734f7f04d95e61219fc5e69a1a116202984ee674eb387bbaaa9b1764736f6c63430008110033 +\ No newline at end of file diff --git a/python/tests/base_erc20transferauthorization.py b/python/tests/base_erc20transferauthorization.py @@ -13,12 +13,8 @@ from giftable_erc20_token import GiftableToken # local imports from erc20_transfer_authorization import TransferAuthorization -logging.basicConfig(level=logging.DEBUG) logg = logging.getLogger() -logging.getLogger('web3').setLevel(logging.WARNING) -logging.getLogger('eth.vm').setLevel(logging.WARNING) - testdir = os.path.dirname(__file__) diff --git a/python/tests/test_request.py b/python/tests/test_request.py @@ -2,6 +2,7 @@ import os import unittest import logging +import random # external imports from chainlib.eth.nonce import RPCNonceOracle @@ -9,7 +10,6 @@ from chainlib.eth.address import is_same_address from giftable_erc20_token import GiftableToken from eth_erc20 import ERC20 from chainlib.eth.tx import receipt -#from giftable_erc20_token import GiftableToken # local imports from erc20_transfer_authorization import TransferAuthorization @@ -17,6 +17,7 @@ from erc20_transfer_authorization import TransferAuthorization # testutil imports from tests.base_erc20transferauthorization import TestBase +logging.basicConfig(level=logging.DEBUG) logg = logging.getLogger() testdir = os.path.dirname(__file__) @@ -230,5 +231,47 @@ class TestRequest(TestBase): self.assertEqual(balance, 10000-100-5) + def test_hi_lo_shuffle(self): + for i in range(100): + (tx_hash_hex, o) = self.c.create_request(self.address, self.accounts[0], self.accounts[9], self.accounts[(i+1)%8], self.token_address, i+1) + self.rpc.do(o) + + v = list(range(1, 101)) + c = 0 + random.shuffle(v) + for i in v: + logg.info('processing request number {} at index {}'.format(c, i)) + (tx_hash_hex, o) = self.c.nay(self.address, self.accounts[0], i) + self.rpc.do(o) + + (tx_hash_hex, o) = self.c.check_result(self.address, self.accounts[0], i) + self.rpc.do(o) + o = receipt(tx_hash_hex) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + o = self.c.requests(self.address, i, sender_address=self.accounts[0]) + r = self.rpc.do(o) + request = self.c.parse_request(r) + self.assertTrue(request.is_rejected()) + + c += 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, 100-c) + + + 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, 100) + + 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) + + if __name__ == '__main__': unittest.main() diff --git a/solidity/ERC20TransferAuthorization.sol b/solidity/ERC20TransferAuthorization.sol @@ -152,9 +152,14 @@ contract ERC20TransferAuthorization { return lo; } - // get the unfinished vote at the given index + // get the nth unfinished vote, where nth is _idx, starting at 0 function getSerialAt(uint32 _idx) public view returns ( uint32 ) { uint32 i; + + if (lo == hi) { + return 0; + } + for (uint32 j = lo; j < hi; j++) { Transaction storage txx = requests[j]; if (txx.result & 7 == 1) { @@ -207,7 +212,7 @@ contract ERC20TransferAuthorization { bool result; Transaction storage txx = requests[_serial]; - if (txx.result < 1) { + if (txx.result < 1 || txx.result & 6 > 0) { return result; }