commit fe7670270cdf353a0585c6a3cdacea7824c8b1c1
parent 90c67a2be57660bd4cc03672e8d325e4cdf987a5
Author: nolash <dev@holbrook.no>
Date: Tue, 16 Feb 2021 14:03:48 +0100
Add reverse request index for sender and recipient
Diffstat:
4 files changed, 54 insertions(+), 3 deletions(-)
diff --git a/python/erc20_transfer_authorization/data/ERC20TransferAuthorization.bin b/python/erc20_transfer_authorization/data/ERC20TransferAuthorization.bin
@@ -1 +1 @@
-60806040523480156200001157600080fd5b5033600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600481905550600160058190555062000074336200009060201b60201c565b5062000089600160006200027060201b60201c565b506200050b565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000125576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200011c90620003be565b60405180910390fd5b60001515600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514620001bb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001b290620003e0565b60405180910390fd5b6001600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919062000228906200048e565b91905055507f47d1c22a25bb3a5d4e481b9b1e6944c2eade3181a0a20b495ed61d35b5323f24826040516200025e9190620003a1565b60405180910390a16009549050919050565b60006009548311156200028257600080fd5b600083116200029057600080fd5b600954821115620002a057600080fd5b82600781905550816008819055507f9f40cfd22fe91777c78f252bd21a710f3fb007dc2f321876891e7644ba0ae175600754600854600954604051620002e99392919062000402565b60405180910390a16001905092915050565b620003068162000450565b82525050565b60006200031b600a836200043f565b91507f4552525f414343455353000000000000000000000000000000000000000000006000830152602082019050919050565b60006200035d600c836200043f565b91507f4552525f4e4f54464f554e4400000000000000000000000000000000000000006000830152602082019050919050565b6200039b8162000484565b82525050565b6000602082019050620003b86000830184620002fb565b92915050565b60006020820190508181036000830152620003d9816200030c565b9050919050565b60006020820190508181036000830152620003fb816200034e565b9050919050565b600060608201905062000419600083018662000390565b62000428602083018562000390565b62000437604083018462000390565b949350505050565b600082825260208201905092915050565b60006200045d8262000464565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006200049b8262000484565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620004d157620004d0620004dc565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6120df806200051b6000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c8063736c0d5b116100ad578063e3064a7711610071578063e3064a771461038a578063e9f9d28b146103ba578063eb12d61e146103ea578063ed71262a1461041a578063fba00cbd1461044a5761012c565b8063736c0d5b146102b75780637ca548c6146102e757806381d12c58146103055780638da5cb5b1461033c578063bac911ac1461035a5761012c565b80634797569a116100f45780634797569a146101eb57806357ec347a1461021b57806358d71f8214610239578063614f427f146102695780636e417c69146102875761012c565b806302d947ef1461013157806306661abd1461016157806308ae63771461017f5780630e316ab71461019d5780631703a018146101cd575b600080fd5b61014b60048036038101906101469190611973565b61047a565b6040516101589190611c86565b60405180910390f35b6101696104a9565b6040516101769190611c6b565b60405180910390f35b6101876104af565b6040516101949190611d61565b60405180910390f35b6101b760048036038101906101b291906118be565b6104da565b6040516101c49190611d61565b60405180910390f35b6101d561073b565b6040516101e29190611d61565b60405180910390f35b6102056004803603810190610200919061194a565b610741565b6040516102129190611d61565b60405180910390f35b6102236109e5565b6040516102309190611d61565b60405180910390f35b610253600480360381019061024e919061194a565b6109fb565b6040516102609190611d61565b60405180910390f35b610271610c80565b60405161027e9190611d61565b60405180910390f35b6102a1600480360381019061029c919061194a565b610c86565b6040516102ae9190611c50565b60405180910390f35b6102d160048036038101906102cc91906118be565b610f60565b6040516102de9190611c50565b60405180910390f35b6102ef610f80565b6040516102fc9190611d61565b60405180910390f35b61031f600480360381019061031a919061194a565b610f86565b604051610333989796959493929190611d7c565b60405180910390f35b61034461103b565b6040516103519190611bfe565b60405180910390f35b610374600480360381019061036f919061194a565b611061565b6040516103819190611d61565b60405180910390f35b6103a4600480360381019061039f91906119af565b6110f0565b6040516103b19190611c50565b60405180910390f35b6103d460048036038101906103cf919061194a565b611176565b6040516103e19190611c50565b60405180910390f35b61040460048036038101906103ff91906118be565b6113af565b6040516104119190611d61565b60405180910390f35b610434600480360381019061042f91906118e7565b611585565b6040516104419190611d61565b60405180910390f35b610464600480360381019061045f91906119af565b6117cf565b6040516104719190611bfe565b60405180910390f35b60006020528160005260406000206020528060005260406000206000915091509054906101000a900460000b81565b60065481565b6000806005546004546104c29190611e81565b14156104d157600090506104d7565b60055490505b90565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061056357508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6105a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059990611cc1565b60405180910390fd5b60011515600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610635576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062c90611ce1565b60405180910390fd5b60075460095411801561064b5750600854600954115b61068a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068190611ca1565b60405180910390fd5b6000600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600960008154809291906106f590611f90565b91905055507f3525e22824a8a7df2c9a6029941c824cf95b6447f1e13d5128fd3826d35afe8b826040516107299190611bfe565b60405180910390a16009549050919050565b60075481565b6000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166107cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c690611cc1565b60405180910390fd5b600080600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460000b60000b14610871576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086890611d01565b60405180910390fd5b600060036000848152602001908152602001600020905060018160070160009054906101000a900460000b60000b146108a957600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000808360000154815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360000b60ff1602179055506001600082600001548152602001908152602001600020339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060060160008154809291906109c590612003565b91905055506109d78160000154611176565b508060060154915050919050565b600060016004546109f69190611e81565b905090565b6000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610a89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8090611cc1565b60405180910390fd5b600080600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460000b60000b14610b2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2290611d01565b60405180910390fd5b600060036000848152602001908152602001600020905060018160070160009054906101000a900460000b60000b14610b6357600080fd5b60016000808360000154815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360000b60ff1602179055506001600082600001548152602001908152602001600020339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806005016000815480929190610c6090612003565b9190505550610c728160000154611176565b508060050154915050919050565b60085481565b6000806003600084815260200190815260200160002090506000816000015411610ce5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdc90611d21565b60405180910390fd5b60028160070160009054906101000a900460000b60000b14610d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3390611d41565b60405180910390fd5b60008160070160006101000a81548160ff021916908360000b60ff1602179055506000808260030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168460020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168560040154604051602401610dfc93929190611c19565b6040516020818303038152906040527f23b872dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610e869190611be7565b6000604051808303816000865af19150503d8060008114610ec3576040519150601f19603f3d011682016040523d82523d6000602084013e610ec8565b606091505b5091509150610eda836000015461181d565b508115610f1d577fbcf6a68a2f901be4a23a41b53acd7697893a7e34def4e28acba584da75283b6785604051610f109190611d61565b60405180910390a1610f55565b7fdab20a0fcd702cf875c2d715d5c3fc99af66a716c94b3405408c94b7311c99eb85604051610f4c9190611d61565b60405180910390a15b819350505050919050565b600a6020528060005260406000206000915054906101000a900460ff1681565b60095481565b60036020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060040154908060050154908060060154908060070160009054906101000a900460000b905088565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060055490505b6004548110156110e457600060036000838152602001908152602001600020905060008160070160009054906101000a900460000b60000b13156110d057848314156110c157806000015493505050506110eb565b82806110cc90612003565b9350505b5080806110dc90612003565b91505061106c565b5060009150505b919050565b600060095483111561110157600080fd5b6000831161110e57600080fd5b60095482111561111d57600080fd5b82600781905550816008819055507f9f40cfd22fe91777c78f252bd21a710f3fb007dc2f321876891e7644ba0ae17560075460085460095460405161116493929190611e23565b60405180910390a16001905092915050565b600080600060036000858152602001908152602001600020905060018160070160009054906101000a900460000b60000b12156111b75781925050506113aa565b6007548160050154106112345760028160070160006101000a81548160ff021916908360000b60ff16021790555080600001547f36ea04725f8aa40ee603224671681b753f9cba3cb5f67c5a0e24a3b39900c06582600501548360060154604051611223929190611dfa565b60405180910390a2600191506113a4565b600060085411801561124c5750600854816006015410155b156112ee577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160070160006101000a81548160ff021916908360000b60ff16021790555061129e816000015461181d565b5080600001547f1ad80b2541a1f52bdc838332d7c23606116a1188a8cbbc4c0948b4b56ce51d14826005015483600601546040516112dd929190611dfa565b60405180910390a2600191506113a3565b60075481600601546009546113039190611e81565b10156113a2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160070160006101000a81548160ff021916908360000b60ff160217905550611356816000015461181d565b5080600001547f3d61d434b895790b08f040c45261fce3b3bec596278b3a0f25dd9f741d0ba46982600501548360060154604051611395929190611dfa565b60405180910390a2600191505b5b5b81925050505b919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611441576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143890611cc1565b60405180910390fd5b60001515600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146114d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114cb90611ce1565b60405180910390fd5b6001600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506009600081548092919061153f90612003565b91905055507f47d1c22a25bb3a5d4e481b9b1e6944c2eade3181a0a20b495ed61d35b5323f24826040516115739190611bfe565b60405180910390a16009549050919050565b60008060036000600454815260200190815260200160002090506004548160000181905550848160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550858160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082816004018190555060018160070160006101000a81548160ff021916908360000b60ff160217905550600660008154809291906116b090611fba565b9190505550600460008154809291906116c890612003565b91905055508060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fb609ae609609ee99268d05bc1371102cafe8d6b964bf082439ab16be2a01c87c846004015485600001546040516117b7929190611dfa565b60405180910390a48060000154915050949350505050565b600160205281600052604060002081815481106117eb57600080fd5b906000526020600020016000915091509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006006600081548092919061183290611f47565b9190505550600060065413156118805760055482141561187b5760006118586000611061565b9050600081141561187157600454600581905550611879565b806005819055505b505b61188a565b6004546005819055505b6005549050919050565b6000813590506118a38161207b565b92915050565b6000813590506118b881612092565b92915050565b6000602082840312156118d057600080fd5b60006118de84828501611894565b91505092915050565b600080600080608085870312156118fd57600080fd5b600061190b87828801611894565b945050602061191c87828801611894565b935050604061192d87828801611894565b925050606061193e878288016118a9565b91505092959194509250565b60006020828403121561195c57600080fd5b600061196a848285016118a9565b91505092915050565b6000806040838503121561198657600080fd5b6000611994858286016118a9565b92505060206119a585828601611894565b9150509250929050565b600080604083850312156119c257600080fd5b60006119d0858286016118a9565b92505060206119e1858286016118a9565b9150509250929050565b6119f481611eb5565b82525050565b611a0381611ec7565b82525050565b6000611a1482611e5a565b611a1e8185611e65565b9350611a2e818560208601611f14565b80840191505092915050565b611a4381611ed3565b82525050565b611a5281611edd565b82525050565b6000611a65601a83611e70565b91507f4552525f5245445543455f5448524553484f4c445f46495253540000000000006000830152602082019050919050565b6000611aa5600a83611e70565b91507f4552525f414343455353000000000000000000000000000000000000000000006000830152602082019050919050565b6000611ae5600c83611e70565b91507f4552525f4e4f54464f554e4400000000000000000000000000000000000000006000830152602082019050919050565b6000611b25601083611e70565b91507f4552525f414c5245414459564f544544000000000000000000000000000000006000830152602082019050919050565b6000611b65601383611e70565b91507f4552525f494e56414c49445f52455155455354000000000000000000000000006000830152602082019050919050565b6000611ba5601083611e70565b91507f4552525f4e4f545f454e444f52534544000000000000000000000000000000006000830152602082019050919050565b611be181611f0a565b82525050565b6000611bf38284611a09565b915081905092915050565b6000602082019050611c1360008301846119eb565b92915050565b6000606082019050611c2e60008301866119eb565b611c3b60208301856119eb565b611c486040830184611bd8565b949350505050565b6000602082019050611c6560008301846119fa565b92915050565b6000602082019050611c806000830184611a3a565b92915050565b6000602082019050611c9b6000830184611a49565b92915050565b60006020820190508181036000830152611cba81611a58565b9050919050565b60006020820190508181036000830152611cda81611a98565b9050919050565b60006020820190508181036000830152611cfa81611ad8565b9050919050565b60006020820190508181036000830152611d1a81611b18565b9050919050565b60006020820190508181036000830152611d3a81611b58565b9050919050565b60006020820190508181036000830152611d5a81611b98565b9050919050565b6000602082019050611d766000830184611bd8565b92915050565b600061010082019050611d92600083018b611bd8565b611d9f602083018a6119eb565b611dac60408301896119eb565b611db960608301886119eb565b611dc66080830187611bd8565b611dd360a0830186611bd8565b611de060c0830185611bd8565b611ded60e0830184611a49565b9998505050505050505050565b6000604082019050611e0f6000830185611bd8565b611e1c6020830184611bd8565b9392505050565b6000606082019050611e386000830186611bd8565b611e456020830185611bd8565b611e526040830184611bd8565b949350505050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b6000611e8c82611f0a565b9150611e9783611f0a565b925082821015611eaa57611ea961204c565b5b828203905092915050565b6000611ec082611eea565b9050919050565b60008115159050919050565b6000819050919050565b60008160000b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015611f32578082015181840152602081019050611f17565b83811115611f41576000848401525b50505050565b6000611f5282611ed3565b91507f8000000000000000000000000000000000000000000000000000000000000000821415611f8557611f8461204c565b5b600182039050919050565b6000611f9b82611f0a565b91506000821415611faf57611fae61204c565b5b600182039050919050565b6000611fc582611ed3565b91507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611ff857611ff761204c565b5b600182019050919050565b600061200e82611f0a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156120415761204061204c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61208481611eb5565b811461208f57600080fd5b50565b61209b81611f0a565b81146120a657600080fd5b5056fea2646970667358221220cf5ec498c503d460d54980770a2d0ad609d44aca46862ead18030676b3ca3cb764736f6c63430008000033
-\ No newline at end of file
+60806040523480156200001157600080fd5b5033600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600681905550600160078190555062000074336200009060201b60201c565b5062000089600160006200027060201b60201c565b506200050b565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000125576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200011c90620003be565b60405180910390fd5b60001515600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514620001bb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001b290620003e0565b60405180910390fd5b6001600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600b600081548092919062000228906200048e565b91905055507f47d1c22a25bb3a5d4e481b9b1e6944c2eade3181a0a20b495ed61d35b5323f24826040516200025e9190620003a1565b60405180910390a1600b549050919050565b6000600b548311156200028257600080fd5b600083116200029057600080fd5b600b54821115620002a057600080fd5b8260098190555081600a819055507f9f40cfd22fe91777c78f252bd21a710f3fb007dc2f321876891e7644ba0ae175600954600a54600b54604051620002e99392919062000402565b60405180910390a16001905092915050565b620003068162000450565b82525050565b60006200031b600a836200043f565b91507f4552525f414343455353000000000000000000000000000000000000000000006000830152602082019050919050565b60006200035d600c836200043f565b91507f4552525f4e4f54464f554e4400000000000000000000000000000000000000006000830152602082019050919050565b6200039b8162000484565b82525050565b6000602082019050620003b86000830184620002fb565b92915050565b60006020820190508181036000830152620003d9816200030c565b9050919050565b60006020820190508181036000830152620003fb816200034e565b9050919050565b600060608201905062000419600083018662000390565b62000428602083018562000390565b62000437604083018462000390565b949350505050565b600082825260208201905092915050565b60006200045d8262000464565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006200049b8262000484565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620004d157620004d0620004dc565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61232e806200051b6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c8063736c0d5b116100b8578063bac911ac1161007c578063bac911ac146103d1578063e3064a7714610401578063e9f9d28b14610431578063eb12d61e14610461578063ed71262a14610491578063fba00cbd146104c157610142565b8063736c0d5b146102fd578063755fd58f1461032d5780637ca548c61461035d57806381d12c581461037b5780638da5cb5b146103b357610142565b80633a9ddc801161010a5780633a9ddc80146102015780634797569a1461023157806357ec347a1461026157806358d71f821461027f578063614f427f146102af5780636e417c69146102cd57610142565b806302d947ef1461014757806306661abd1461017757806308ae6377146101955780630e316ab7146101b35780631703a018146101e3575b600080fd5b610161600480360381019061015c9190611bb3565b6104f1565b60405161016e9190611ec6565b60405180910390f35b61017f610520565b60405161018c9190611eab565b60405180910390f35b61019d610526565b6040516101aa9190611fa1565b60405180910390f35b6101cd60048036038101906101c89190611ac2565b610551565b6040516101da9190611fa1565b60405180910390f35b6101eb6107b2565b6040516101f89190611fa1565b60405180910390f35b61021b60048036038101906102169190611b4e565b6107b8565b6040516102289190611fa1565b60405180910390f35b61024b60048036038101906102469190611b8a565b6107e9565b6040516102589190611fa1565b60405180910390f35b610269610a8d565b6040516102769190611fa1565b60405180910390f35b61029960048036038101906102949190611b8a565b610aa3565b6040516102a69190611fa1565b60405180910390f35b6102b7610d28565b6040516102c49190611fa1565b60405180910390f35b6102e760048036038101906102e29190611b8a565b610d2e565b6040516102f49190611e90565b60405180910390f35b61031760048036038101906103129190611ac2565b61112d565b6040516103249190611e90565b60405180910390f35b61034760048036038101906103429190611b4e565b61114d565b6040516103549190611fa1565b60405180910390f35b61036561117e565b6040516103729190611fa1565b60405180910390f35b61039560048036038101906103909190611b8a565b611184565b6040516103aa99989796959493929190611fbc565b60405180910390f35b6103bb61123f565b6040516103c89190611e3e565b60405180910390f35b6103eb60048036038101906103e69190611b8a565b611265565b6040516103f89190611fa1565b60405180910390f35b61041b60048036038101906104169190611bef565b6112f4565b6040516104289190611e90565b60405180910390f35b61044b60048036038101906104469190611b8a565b61137a565b6040516104589190611e90565b60405180910390f35b61047b60048036038101906104769190611ac2565b6115b3565b6040516104889190611fa1565b60405180910390f35b6104ab60048036038101906104a69190611aeb565b611789565b6040516104b89190611fa1565b60405180910390f35b6104db60048036038101906104d69190611bef565b6119d3565b6040516104e89190611e3e565b60405180910390f35b60006020528160005260406000206020528060005260406000206000915091509054906101000a900460000b81565b60085481565b60008060075460065461053991906120d0565b1415610548576000905061054e565b60075490505b90565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806105da57508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610619576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161061090611f01565b60405180910390fd5b60011515600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146106ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a390611f21565b60405180910390fd5b600954600b541180156106c25750600a54600b54115b610701576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f890611ee1565b60405180910390fd5b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600b600081548092919061076c906121df565b91905055507f3525e22824a8a7df2c9a6029941c824cf95b6447f1e13d5128fd3826d35afe8b826040516107a09190611e3e565b60405180910390a1600b549050919050565b60095481565b600560205281600052604060002081815481106107d457600080fd5b90600052602060002001600091509150505481565b6000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610877576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086e90611f01565b60405180910390fd5b600080600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460000b60000b14610919576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091090611f41565b60405180910390fd5b600060036000848152602001908152602001600020905060018160080160009054906101000a900460000b60000b1461095157600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000808360000154815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360000b60ff1602179055506001600082600001548152602001908152602001600020339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806006016000815480929190610a6d90612252565b9190505550610a7f816000015461137a565b508060060154915050919050565b60006001600654610a9e91906120d0565b905090565b6000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610b31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2890611f01565b60405180910390fd5b600080600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460000b60000b14610bd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bca90611f41565b60405180910390fd5b600060036000848152602001908152602001600020905060018160080160009054906101000a900460000b60000b14610c0b57600080fd5b60016000808360000154815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360000b60ff1602179055506001600082600001548152602001908152602001600020339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806005016000815480929190610d0890612252565b9190505550610d1a816000015461137a565b508060050154915050919050565b600a5481565b6000806003600084815260200190815260200160002090506000816000015411610d8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8490611f61565b60405180910390fd5b60028160080160009054906101000a900460000b60000b14610de4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ddb90611f81565b60405180910390fd5b60008160080160006101000a81548160ff021916908360000b60ff1602179055506000808260030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168460020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168560040154604051602401610ea493929190611e59565b6040516020818303038152906040527f23b872dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610f2e9190611e27565b6000604051808303816000865af19150503d8060008114610f6b576040519150601f19603f3d011682016040523d82523d6000602084013e610f70565b606091505b5091509150610f828360000154611a21565b50438360070181905550600460008460010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002083600001549080600181540180825580915050600190039060005260206000200160009091909190915055600560008460020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208360000154908060018154018082558091505060019003906000526020600020016000909190919091505581156110ea577fbcf6a68a2f901be4a23a41b53acd7697893a7e34def4e28acba584da75283b67856040516110dd9190611fa1565b60405180910390a1611122565b7fdab20a0fcd702cf875c2d715d5c3fc99af66a716c94b3405408c94b7311c99eb856040516111199190611fa1565b60405180910390a15b819350505050919050565b600c6020528060005260406000206000915054906101000a900460ff1681565b6004602052816000526040600020818154811061116957600080fd5b90600052602060002001600091509150505481565b600b5481565b60036020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060040154908060050154908060060154908060070154908060080160009054906101000a900460000b905089565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060075490505b6006548110156112e857600060036000838152602001908152602001600020905060008160080160009054906101000a900460000b60000b13156112d457848314156112c557806000015493505050506112ef565b82806112d090612252565b9350505b5080806112e090612252565b915050611270565b5060009150505b919050565b6000600b5483111561130557600080fd5b6000831161131257600080fd5b600b5482111561132157600080fd5b8260098190555081600a819055507f9f40cfd22fe91777c78f252bd21a710f3fb007dc2f321876891e7644ba0ae175600954600a54600b5460405161136893929190612072565b60405180910390a16001905092915050565b600080600060036000858152602001908152602001600020905060018160080160009054906101000a900460000b60000b12156113bb5781925050506115ae565b6009548160050154106114385760028160080160006101000a81548160ff021916908360000b60ff16021790555080600001547f36ea04725f8aa40ee603224671681b753f9cba3cb5f67c5a0e24a3b39900c06582600501548360060154604051611427929190612049565b60405180910390a2600191506115a8565b6000600a541180156114505750600a54816006015410155b156114f2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160080160006101000a81548160ff021916908360000b60ff1602179055506114a28160000154611a21565b5080600001547f1ad80b2541a1f52bdc838332d7c23606116a1188a8cbbc4c0948b4b56ce51d14826005015483600601546040516114e1929190612049565b60405180910390a2600191506115a7565b6009548160060154600b5461150791906120d0565b10156115a6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160080160006101000a81548160ff021916908360000b60ff16021790555061155a8160000154611a21565b5080600001547f3d61d434b895790b08f040c45261fce3b3bec596278b3a0f25dd9f741d0ba46982600501548360060154604051611599929190612049565b60405180910390a2600191505b5b5b81925050505b919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163c90611f01565b60405180910390fd5b60001515600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146116d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cf90611f21565b60405180910390fd5b6001600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600b600081548092919061174390612252565b91905055507f47d1c22a25bb3a5d4e481b9b1e6944c2eade3181a0a20b495ed61d35b5323f24826040516117779190611e3e565b60405180910390a1600b549050919050565b60008060036000600654815260200190815260200160002090506006548160000181905550848160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550858160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082816004018190555060018160080160006101000a81548160ff021916908360000b60ff160217905550600860008154809291906118b490612209565b9190505550600660008154809291906118cc90612252565b91905055508060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fb609ae609609ee99268d05bc1371102cafe8d6b964bf082439ab16be2a01c87c846004015485600001546040516119bb929190612049565b60405180910390a48060000154915050949350505050565b600160205281600052604060002081815481106119ef57600080fd5b906000526020600020016000915091509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060086000815480929190611a3690612196565b919050555060006008541315611a8457600754821415611a7f576000611a5c6000611265565b90506000811415611a7557600654600781905550611a7d565b806007819055505b505b611a8e565b6006546007819055505b6007549050919050565b600081359050611aa7816122ca565b92915050565b600081359050611abc816122e1565b92915050565b600060208284031215611ad457600080fd5b6000611ae284828501611a98565b91505092915050565b60008060008060808587031215611b0157600080fd5b6000611b0f87828801611a98565b9450506020611b2087828801611a98565b9350506040611b3187828801611a98565b9250506060611b4287828801611aad565b91505092959194509250565b60008060408385031215611b6157600080fd5b6000611b6f85828601611a98565b9250506020611b8085828601611aad565b9150509250929050565b600060208284031215611b9c57600080fd5b6000611baa84828501611aad565b91505092915050565b60008060408385031215611bc657600080fd5b6000611bd485828601611aad565b9250506020611be585828601611a98565b9150509250929050565b60008060408385031215611c0257600080fd5b6000611c1085828601611aad565b9250506020611c2185828601611aad565b9150509250929050565b611c3481612104565b82525050565b611c4381612116565b82525050565b6000611c54826120a9565b611c5e81856120b4565b9350611c6e818560208601612163565b80840191505092915050565b611c8381612122565b82525050565b611c928161212c565b82525050565b6000611ca5601a836120bf565b91507f4552525f5245445543455f5448524553484f4c445f46495253540000000000006000830152602082019050919050565b6000611ce5600a836120bf565b91507f4552525f414343455353000000000000000000000000000000000000000000006000830152602082019050919050565b6000611d25600c836120bf565b91507f4552525f4e4f54464f554e4400000000000000000000000000000000000000006000830152602082019050919050565b6000611d656010836120bf565b91507f4552525f414c5245414459564f544544000000000000000000000000000000006000830152602082019050919050565b6000611da56013836120bf565b91507f4552525f494e56414c49445f52455155455354000000000000000000000000006000830152602082019050919050565b6000611de56010836120bf565b91507f4552525f4e4f545f454e444f52534544000000000000000000000000000000006000830152602082019050919050565b611e2181612159565b82525050565b6000611e338284611c49565b915081905092915050565b6000602082019050611e536000830184611c2b565b92915050565b6000606082019050611e6e6000830186611c2b565b611e7b6020830185611c2b565b611e886040830184611e18565b949350505050565b6000602082019050611ea56000830184611c3a565b92915050565b6000602082019050611ec06000830184611c7a565b92915050565b6000602082019050611edb6000830184611c89565b92915050565b60006020820190508181036000830152611efa81611c98565b9050919050565b60006020820190508181036000830152611f1a81611cd8565b9050919050565b60006020820190508181036000830152611f3a81611d18565b9050919050565b60006020820190508181036000830152611f5a81611d58565b9050919050565b60006020820190508181036000830152611f7a81611d98565b9050919050565b60006020820190508181036000830152611f9a81611dd8565b9050919050565b6000602082019050611fb66000830184611e18565b92915050565b600061012082019050611fd2600083018c611e18565b611fdf602083018b611c2b565b611fec604083018a611c2b565b611ff96060830189611c2b565b6120066080830188611e18565b61201360a0830187611e18565b61202060c0830186611e18565b61202d60e0830185611e18565b61203b610100830184611c89565b9a9950505050505050505050565b600060408201905061205e6000830185611e18565b61206b6020830184611e18565b9392505050565b60006060820190506120876000830186611e18565b6120946020830185611e18565b6120a16040830184611e18565b949350505050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b60006120db82612159565b91506120e683612159565b9250828210156120f9576120f861229b565b5b828203905092915050565b600061210f82612139565b9050919050565b60008115159050919050565b6000819050919050565b60008160000b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015612181578082015181840152602081019050612166565b83811115612190576000848401525b50505050565b60006121a182612122565b91507f80000000000000000000000000000000000000000000000000000000000000008214156121d4576121d361229b565b5b600182039050919050565b60006121ea82612159565b915060008214156121fe576121fd61229b565b5b600182039050919050565b600061221482612122565b91507f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156122475761224661229b565b5b600182019050919050565b600061225d82612159565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156122905761228f61229b565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6122d381612104565b81146122de57600080fd5b50565b6122ea81612159565b81146122f557600080fd5b5056fea2646970667358221220c79a4ccb8a0a4e213dcbf12724833dfab1ccdef16c91695e85b3de2f1ad551f964736f6c63430008000033
+\ No newline at end of file
diff --git a/python/erc20_transfer_authorization/data/ERC20TransferAuthorization.json b/python/erc20_transfer_authorization/data/ERC20TransferAuthorization.json
@@ -1 +1 @@
-[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_serial","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_yays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_nays","type":"uint256"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"NewRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_quorum","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_vetoThreshold","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_signerCount","type":"uint256"}],"name":"QuorumSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_serial","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_yays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_nays","type":"uint256"}],"name":"Rejected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_signer","type":"address"}],"name":"SignerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_signer","type":"address"}],"name":"SignerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"TransferFail","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_serial","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_yays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_nays","type":"uint256"}],"name":"Vetoed","type":"event"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"addSigner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"checkResult","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"count","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"createRequest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"executeRequest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"getSerialAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastSerial","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"nay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nextSerial","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quorum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"removeSigner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requests","outputs":[{"internalType":"uint256","name":"serial","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"yay","type":"uint256"},{"internalType":"uint256","name":"nay","type":"uint256"},{"internalType":"int8","name":"result","type":"int8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quorum","type":"uint256"},{"internalType":"uint256","name":"_vetoThreshold","type":"uint256"}],"name":"setThresholds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"signers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vetoThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"vote","outputs":[{"internalType":"int8","name":"","type":"int8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"voters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"yay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
+[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_serial","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_yays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_nays","type":"uint256"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"NewRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_quorum","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_vetoThreshold","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_signerCount","type":"uint256"}],"name":"QuorumSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_serial","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_yays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_nays","type":"uint256"}],"name":"Rejected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_signer","type":"address"}],"name":"SignerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_signer","type":"address"}],"name":"SignerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"TransferFail","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_serial","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_yays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_nays","type":"uint256"}],"name":"Vetoed","type":"event"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"addSigner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"checkResult","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"count","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"createRequest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"executeRequest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"getSerialAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastSerial","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"nay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nextSerial","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quorum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"removeSigner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"requestRecipientIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"requestSenderIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requests","outputs":[{"internalType":"uint256","name":"serial","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"yay","type":"uint256"},{"internalType":"uint256","name":"nay","type":"uint256"},{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"int8","name":"result","type":"int8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quorum","type":"uint256"},{"internalType":"uint256","name":"_vetoThreshold","type":"uint256"}],"name":"setThresholds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"signers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vetoThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"vote","outputs":[{"internalType":"int8","name":"","type":"int8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"voters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"yay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
diff --git a/python/tests/test_transfer.py b/python/tests/test_transfer.py
@@ -0,0 +1,45 @@
+# standard imports
+import logging
+import unittest
+
+# testutil imports
+from tests.base import TestBase
+
+logg = logging.getLogger()
+
+
+class ERC20TransferAuthorizationTransferTest(TestBase):
+
+ def test_transfer(self):
+ w = self.w3.eth.contract(abi=self.abi_wallet, address=self.address_wallet)
+ t = self.w3.eth.contract(abi=self.abi_token, address=self.address_token)
+
+ t.functions.approve(w.address, 10).transact({'from': self.w3.eth.accounts[2]})
+ self.eth_tester.mine_block()
+
+ tx_hash = w.functions.createRequest(self.w3.eth.accounts[2], self.w3.eth.accounts[3], t.address, 10).transact({'from': self.w3.eth.accounts[9]})
+ r = self.w3.eth.getTransactionReceipt(tx_hash)
+
+ topic_match = 'b609ae609609ee99268d05bc1371102cafe8d6b964bf082439ab16be2a01c87c'
+ log = r.logs[0]
+ topic = log.topics[0]
+ self.assertEqual(topic.hex()[2:], topic_match)
+ serial = int(log.data[66:], 16)
+
+ w.functions.yay(serial).transact({'from': self.w3.eth.accounts[0]})
+ w.functions.executeRequest(serial).transact({'from': self.w3.eth.accounts[0]})
+
+ self.assertEqual(t.functions.balanceOf(self.w3.eth.accounts[2]).call(), 90)
+ self.assertEqual(t.functions.balanceOf(self.w3.eth.accounts[3]).call(), 10)
+
+ req = w.functions.requests(1).call()
+ self.assertEqual(req[7], self.w3.eth.blockNumber)
+
+ serial_compare = w.functions.requestSenderIndex(self.w3.eth.accounts[2], 0).call()
+ self.assertEqual(serial_compare, req[0])
+
+ serial_compare = w.functions.requestRecipientIndex(self.w3.eth.accounts[3], 0).call()
+ self.assertEqual(serial_compare, req[0])
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/solidity/ERC20TransferAuthorization.sol b/solidity/ERC20TransferAuthorization.sol
@@ -11,6 +11,7 @@ contract ERC20TransferAuthorization {
uint256 value;
uint256 yay;
uint256 nay;
+ uint256 blockNumber;
int8 result; // -1 rejected/vetoed, 0 = completed, 1 = voting, 2 = approved
}
@@ -18,6 +19,8 @@ contract ERC20TransferAuthorization {
mapping ( uint256 => address[] ) public voters;
address public owner;
mapping(uint256 => Transaction) public requests;
+ mapping(address => uint256[]) public requestSenderIndex;
+ mapping(address => uint256[]) public requestRecipientIndex;
uint256 hi;
uint256 lo;
int256 public count;
@@ -222,6 +225,9 @@ contract ERC20TransferAuthorization {
removeItem(txx.serial);
+ txx.blockNumber = block.number;
+ requestSenderIndex[txx.sender].push(txx.serial);
+ requestRecipientIndex[txx.recipient].push(txx.serial);
if (success) {
emit Executed(_serial);
} else {