commit e6591adc9cfc17dc0286f8e2224a8b4fdc93b45c parent 3c8219b313b1011beb371771f6e1a26525044f8d Author: lash <dev@holbrook.no> Date: Thu, 3 Aug 2023 10:25:47 +0100 Add tokenlimit interface indicator Diffstat:
6 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/python/erc20_limiter/data/Limiter.bin b/python/erc20_limiter/data/Limiter.bin @@ -1 +1 @@ -608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610931806100606000396000f3fe608060405234801561001057600080fd5b506004361061007f576000357c01000000000000000000000000000000000000000000000000000000009004806301ffc9a71461008457806323778613146100b457806336db43b5146100e45780638da5cb5b14610100578063bdd554401461011e578063f2fde38b1461013a575b600080fd5b61009e60048036038101906100999190610633565b61016a565b6040516100ab919061067b565b60405180910390f35b6100ce60048036038101906100c991906106f4565b61021a565b6040516100db919061074d565b60405180910390f35b6100fe60048036038101906100f99190610794565b6102a1565b005b610108610326565b60405161011591906107e3565b60405180910390f35b610138600480360381019061013391906107fe565b61034a565b005b610154600480360381019061014f9190610851565b610494565b604051610161919061067b565b60405180910390f35b60006301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036101be5760019050610215565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102105760019050610215565b600090505b919050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806103cf57508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61040e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610405906108db565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104ef57600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36001915050919050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610610816105db565b811461061b57600080fd5b50565b60008135905061062d81610607565b92915050565b600060208284031215610649576106486105d6565b5b60006106578482850161061e565b91505092915050565b60008115159050919050565b61067581610660565b82525050565b6000602082019050610690600083018461066c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006106c182610696565b9050919050565b6106d1816106b6565b81146106dc57600080fd5b50565b6000813590506106ee816106c8565b92915050565b6000806040838503121561070b5761070a6105d6565b5b6000610719858286016106df565b925050602061072a858286016106df565b9150509250929050565b6000819050919050565b61074781610734565b82525050565b6000602082019050610762600083018461073e565b92915050565b61077181610734565b811461077c57600080fd5b50565b60008135905061078e81610768565b92915050565b600080604083850312156107ab576107aa6105d6565b5b60006107b9858286016106df565b92505060206107ca8582860161077f565b9150509250929050565b6107dd816106b6565b82525050565b60006020820190506107f860008301846107d4565b92915050565b600080600060608486031215610817576108166105d6565b5b6000610825868287016106df565b9350506020610836868287016106df565b92505060406108478682870161077f565b9150509250925092565b600060208284031215610867576108666105d6565b5b6000610875848285016106df565b91505092915050565b600082825260208201905092915050565b7f4552525f41585800000000000000000000000000000000000000000000000000600082015250565b60006108c560078361087e565b91506108d08261088f565b602082019050919050565b600060208201905081810360008301526108f4816108b8565b905091905056fea2646970667358221220637537cee91db8d40743b879190b927cde6e34eee8a9524863365ce11ec024c664736f6c63430008130033 -\ No newline at end of file +608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610983806100606000396000f3fe608060405234801561001057600080fd5b506004361061007f576000357c01000000000000000000000000000000000000000000000000000000009004806301ffc9a71461008457806323778613146100b457806336db43b5146100e45780638da5cb5b14610100578063bdd554401461011e578063f2fde38b1461013a575b600080fd5b61009e60048036038101906100999190610685565b61016a565b6040516100ab91906106cd565b60405180910390f35b6100ce60048036038101906100c99190610746565b61026c565b6040516100db919061079f565b60405180910390f35b6100fe60048036038101906100f991906107e6565b6102f3565b005b610108610378565b6040516101159190610835565b60405180910390f35b61013860048036038101906101339190610850565b61039c565b005b610154600480360381019061014f91906108a3565b6104e6565b60405161016191906106cd565b60405180910390f35b60006301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036101be5760019050610267565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102105760019050610267565b63237786137c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036102625760019050610267565b600090505b919050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061042157508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610460576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104579061092d565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461054157600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36001915050919050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6106628161062d565b811461066d57600080fd5b50565b60008135905061067f81610659565b92915050565b60006020828403121561069b5761069a610628565b5b60006106a984828501610670565b91505092915050565b60008115159050919050565b6106c7816106b2565b82525050565b60006020820190506106e260008301846106be565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610713826106e8565b9050919050565b61072381610708565b811461072e57600080fd5b50565b6000813590506107408161071a565b92915050565b6000806040838503121561075d5761075c610628565b5b600061076b85828601610731565b925050602061077c85828601610731565b9150509250929050565b6000819050919050565b61079981610786565b82525050565b60006020820190506107b46000830184610790565b92915050565b6107c381610786565b81146107ce57600080fd5b50565b6000813590506107e0816107ba565b92915050565b600080604083850312156107fd576107fc610628565b5b600061080b85828601610731565b925050602061081c858286016107d1565b9150509250929050565b61082f81610708565b82525050565b600060208201905061084a6000830184610826565b92915050565b60008060006060848603121561086957610868610628565b5b600061087786828701610731565b935050602061088886828701610731565b9250506040610899868287016107d1565b9150509250925092565b6000602082840312156108b9576108b8610628565b5b60006108c784828501610731565b91505092915050565b600082825260208201905092915050565b7f4552525f41585800000000000000000000000000000000000000000000000000600082015250565b60006109176007836108d0565b9150610922826108e1565b602082019050919050565b600060208201905081810360008301526109468161090a565b905091905056fea2646970667358221220ae88dd476f4b24adfae68410611cc64e22e747c3dd822fa91011f5db46a9161e64736f6c63430008130033 +\ No newline at end of file diff --git a/python/erc20_limiter/data/Limiter.metadata.json b/python/erc20_limiter/data/Limiter.metadata.json @@ -1 +1 @@ -{"compiler":{"version":"0.8.19+commit.7dd6d404"},"language":"Solidity","output":{"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_holder","type":"address"}],"name":"limitOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_holder","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setLimitFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"Limiter.sol":"Limiter"},"evmVersion":"byzantium","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"Limiter.sol":{"keccak256":"0x5d2efe5fb5477abcc3f9ae9cb2f89caa2138ae71308f74e7860fea85999fd7c5","license":"AGPL-3.0-or-later","urls":["bzz-raw://3cc9ed399ceab3c64b147cafaa577351a943a442ab3d7fece036444c88d3800e","dweb:/ipfs/Qmd41uw2HGfXd1AvKGQAHsikjvopRPLidXBDQrx5zz6igT"]}},"version":1} +{"compiler":{"version":"0.8.19+commit.7dd6d404"},"language":"Solidity","output":{"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_holder","type":"address"}],"name":"limitOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_holder","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setLimitFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"Limiter.sol":"Limiter"},"evmVersion":"byzantium","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"Limiter.sol":{"keccak256":"0xe75d2e061598eaa9bbcb16988fdfa5529bf389ca4e3c0e882dcb410b740c6e99","license":"AGPL-3.0-or-later","urls":["bzz-raw://e19eb2419d10a285b95dbcccc4405d36917f199048e5b32d14c1539c1638933a","dweb:/ipfs/QmZ4haakZYs8LbC9ZxMqGnfa8PrWGp1H4rLtC1rFKG5miS"]}},"version":1} diff --git a/python/erc20_limiter/data/LimiterTokenRegistry.bin b/python/erc20_limiter/data/LimiterTokenRegistry.bin @@ -1 +1 @@ -608060405234801561001057600080fd5b506040516109673803806109678339818101604052810190610032919061015b565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505061019b565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100ea826100bf565b9050919050565b6100fa816100df565b811461010557600080fd5b50565b600081519050610117816100f1565b92915050565b6000610128826100df565b9050919050565b6101388161011d565b811461014357600080fd5b50565b6000815190506101558161012f565b92915050565b60008060408385031215610172576101716100ba565b5b600061018085828601610108565b925050602061019185828601610146565b9150509250929050565b6107bd806101aa6000396000f3fe608060405234801561001057600080fd5b5060043610610074576000357c01000000000000000000000000000000000000000000000000000000009004806301ffc9a71461007957806323778613146100a957806336db43b5146100d95780633ef25013146100f5578063bdd5544014610125575b600080fd5b610093600480360381019061008e91906104b5565b610141565b6040516100a091906104fd565b60405180910390f35b6100c360048036038101906100be9190610576565b6101f1565b6040516100d091906105cf565b60405180910390f35b6100f360048036038101906100ee9190610616565b6102b4565b005b61010f600480360381019061010a9190610656565b6102c3565b60405161011c91906104fd565b60405180910390f35b61013f600480360381019061013a9190610683565b6103a8565b005b60006301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361019557600190506101ec565b63b7bca6257c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036101e757600190506101ec565b600090505b919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632377861384846040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161026b9291906106e5565b602060405180830381865afa158015610288573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ac9190610723565b905092915050565b6102bf8233836103a8565b5050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632377861384600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161035f9291906106e5565b602060405180830381865afa15801561037c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a09190610723565b119050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bdd554408484846040518463ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161042193929190610750565b600060405180830381600087803b15801561043b57600080fd5b505af115801561044f573d6000803e3d6000fd5b50505050505050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6104928161045d565b811461049d57600080fd5b50565b6000813590506104af81610489565b92915050565b6000602082840312156104cb576104ca610458565b5b60006104d9848285016104a0565b91505092915050565b60008115159050919050565b6104f7816104e2565b82525050565b600060208201905061051260008301846104ee565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061054382610518565b9050919050565b61055381610538565b811461055e57600080fd5b50565b6000813590506105708161054a565b92915050565b6000806040838503121561058d5761058c610458565b5b600061059b85828601610561565b92505060206105ac85828601610561565b9150509250929050565b6000819050919050565b6105c9816105b6565b82525050565b60006020820190506105e460008301846105c0565b92915050565b6105f3816105b6565b81146105fe57600080fd5b50565b600081359050610610816105ea565b92915050565b6000806040838503121561062d5761062c610458565b5b600061063b85828601610561565b925050602061064c85828601610601565b9150509250929050565b60006020828403121561066c5761066b610458565b5b600061067a84828501610561565b91505092915050565b60008060006060848603121561069c5761069b610458565b5b60006106aa86828701610561565b93505060206106bb86828701610561565b92505060406106cc86828701610601565b9150509250925092565b6106df81610538565b82525050565b60006040820190506106fa60008301856106d6565b61070760208301846106d6565b9392505050565b60008151905061071d816105ea565b92915050565b60006020828403121561073957610738610458565b5b60006107478482850161070e565b91505092915050565b600060608201905061076560008301866106d6565b61077260208301856106d6565b61077f60408301846105c0565b94935050505056fea264697066735822122059ed451c7493185b9c26a93c433ec67c46b6c713de36f371528416bd733499c964736f6c63430008130033 -\ No newline at end of file +608060405234801561001057600080fd5b506040516109b93803806109b98339818101604052810190610032919061015b565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505061019b565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100ea826100bf565b9050919050565b6100fa816100df565b811461010557600080fd5b50565b600081519050610117816100f1565b92915050565b6000610128826100df565b9050919050565b6101388161011d565b811461014357600080fd5b50565b6000815190506101558161012f565b92915050565b60008060408385031215610172576101716100ba565b5b600061018085828601610108565b925050602061019185828601610146565b9150509250929050565b61080f806101aa6000396000f3fe608060405234801561001057600080fd5b5060043610610074576000357c01000000000000000000000000000000000000000000000000000000009004806301ffc9a71461007957806323778613146100a957806336db43b5146100d95780633ef25013146100f5578063bdd5544014610125575b600080fd5b610093600480360381019061008e9190610507565b610141565b6040516100a0919061054f565b60405180910390f35b6100c360048036038101906100be91906105c8565b610243565b6040516100d09190610621565b60405180910390f35b6100f360048036038101906100ee9190610668565b610306565b005b61010f600480360381019061010a91906106a8565b610315565b60405161011c919061054f565b60405180910390f35b61013f600480360381019061013a91906106d5565b6103fa565b005b60006301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610195576001905061023e565b63b7bca6257c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036101e7576001905061023e565b63237786137c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610239576001905061023e565b600090505b919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632377861384846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016102bd929190610737565b602060405180830381865afa1580156102da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102fe9190610775565b905092915050565b6103118233836103fa565b5050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632377861384600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016103b1929190610737565b602060405180830381865afa1580156103ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f29190610775565b119050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bdd554408484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610473939291906107a2565b600060405180830381600087803b15801561048d57600080fd5b505af11580156104a1573d6000803e3d6000fd5b50505050505050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6104e4816104af565b81146104ef57600080fd5b50565b600081359050610501816104db565b92915050565b60006020828403121561051d5761051c6104aa565b5b600061052b848285016104f2565b91505092915050565b60008115159050919050565b61054981610534565b82525050565b60006020820190506105646000830184610540565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105958261056a565b9050919050565b6105a58161058a565b81146105b057600080fd5b50565b6000813590506105c28161059c565b92915050565b600080604083850312156105df576105de6104aa565b5b60006105ed858286016105b3565b92505060206105fe858286016105b3565b9150509250929050565b6000819050919050565b61061b81610608565b82525050565b60006020820190506106366000830184610612565b92915050565b61064581610608565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b6000806040838503121561067f5761067e6104aa565b5b600061068d858286016105b3565b925050602061069e85828601610653565b9150509250929050565b6000602082840312156106be576106bd6104aa565b5b60006106cc848285016105b3565b91505092915050565b6000806000606084860312156106ee576106ed6104aa565b5b60006106fc868287016105b3565b935050602061070d868287016105b3565b925050604061071e86828701610653565b9150509250925092565b6107318161058a565b82525050565b600060408201905061074c6000830185610728565b6107596020830184610728565b9392505050565b60008151905061076f8161063c565b92915050565b60006020828403121561078b5761078a6104aa565b5b600061079984828501610760565b91505092915050565b60006060820190506107b76000830186610728565b6107c46020830185610728565b6107d16040830184610612565b94935050505056fea2646970667358221220d14a5fb84c2c0c33d98c777eb16ce25087d08196d9f62f70806dcc9b49a0052464736f6c63430008130033 +\ No newline at end of file diff --git a/python/erc20_limiter/data/LimiterTokenRegistry.metadata.json b/python/erc20_limiter/data/LimiterTokenRegistry.metadata.json @@ -1 +1 @@ -{"compiler":{"version":"0.8.19+commit.7dd6d404"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_holder","type":"address"},{"internalType":"contract Limiter","name":"_limiter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"have","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_holder","type":"address"}],"name":"limitOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_holder","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setLimitFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"LimiterTokenRegistry.sol":"LimiterTokenRegistry"},"evmVersion":"byzantium","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"LimiterTokenRegistry.sol":{"keccak256":"0xca5fd95fd62ac8530df26ea912eadfcb2c2a00bbf3df9ffe497d7a5c50b84497","license":"AGPL-3.0-or-later","urls":["bzz-raw://7d3e45e63f2e7fa721bd1f2c6a453926e5366bad8cfe3154323ee9d0f3476f5c","dweb:/ipfs/QmQDtyCrn7rf8LyxhrfxRd3K8CMuJuP1GL4YPyGAVETgtY"]}},"version":1} +{"compiler":{"version":"0.8.19+commit.7dd6d404"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"_holder","type":"address"},{"internalType":"contract Limiter","name":"_limiter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"have","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_holder","type":"address"}],"name":"limitOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_holder","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setLimitFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"LimiterTokenRegistry.sol":"LimiterTokenRegistry"},"evmVersion":"byzantium","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"LimiterTokenRegistry.sol":{"keccak256":"0x8bc7716c5a8b9d698a4f8571a89b4da77c790d5d17f6f5e0f83f31fe6faef649","license":"AGPL-3.0-or-later","urls":["bzz-raw://4135e14e8203ca39fc809c7505222686b61dee82362fd3eb0f295b61bb44182a","dweb:/ipfs/Qmf5bCwu61UAK9atMghHbZJC88tfq2X43UDwq2nxeExDZR"]}},"version":1} diff --git a/solidity/Limiter.sol b/solidity/Limiter.sol @@ -50,6 +50,9 @@ contract Limiter { if (_sum == 0x9493f8b2) { // ERC173 return true; } + if (_sum == 0x23778613) { // TokenLimit + return true; + } return false; } } diff --git a/solidity/LimiterTokenRegistry.sol b/solidity/LimiterTokenRegistry.sol @@ -43,6 +43,9 @@ contract LimiterTokenRegistry { if (_sum == 0xb7bca625) { // AccountsIndex return true; } + if (_sum == 0x23778613) { // TokenLimit + return true; + } return false; } }