From a46dfad2a0b2d65aff807827a671b96d912669d0 Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Tue, 9 Apr 2024 15:46:31 +0800 Subject: [PATCH] feat: admin only withdrawals --- python/erc20_pool/data/SwapPool.bin | 2 +- python/erc20_pool/data/SwapPool.json | 2 +- python/erc20_pool/data/SwapPool.metadata.json | 2 +- solidity/SwapPool.sol | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/python/erc20_pool/data/SwapPool.bin b/python/erc20_pool/data/SwapPool.bin index 9a3ee9f..9bb734a 100644 --- a/python/erc20_pool/data/SwapPool.bin +++ b/python/erc20_pool/data/SwapPool.bin @@ -1 +1 @@ -60a060405234801561001057600080fd5b506040516132f13803806132f183398181016040528101906100329190610335565b84600690816100419190610609565b5083600790816100519190610609565b508260ff166080818152505081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050506106db565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61019082610147565b810181811067ffffffffffffffff821117156101af576101ae610158565b5b80604052505050565b60006101c2610129565b90506101ce8282610187565b919050565b600067ffffffffffffffff8211156101ee576101ed610158565b5b6101f782610147565b9050602081019050919050565b60005b83811015610222578082015181840152602081019050610207565b60008484015250505050565b600061024161023c846101d3565b6101b8565b90508281526020810184848401111561025d5761025c610142565b5b610268848285610204565b509392505050565b600082601f8301126102855761028461013d565b5b815161029584826020860161022e565b91505092915050565b600060ff82169050919050565b6102b48161029e565b81146102bf57600080fd5b50565b6000815190506102d1816102ab565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610302826102d7565b9050919050565b610312816102f7565b811461031d57600080fd5b50565b60008151905061032f81610309565b92915050565b600080600080600060a0868803121561035157610350610133565b5b600086015167ffffffffffffffff81111561036f5761036e610138565b5b61037b88828901610270565b955050602086015167ffffffffffffffff81111561039c5761039b610138565b5b6103a888828901610270565b94505060406103b9888289016102c2565b93505060606103ca88828901610320565b92505060806103db88828901610320565b9150509295509295909350565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061043a57607f821691505b60208210810361044d5761044c6103f3565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026104b57fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610478565b6104bf8683610478565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006105066105016104fc846104d7565b6104e1565b6104d7565b9050919050565b6000819050919050565b610520836104eb565b61053461052c8261050d565b848454610485565b825550505050565b600090565b61054961053c565b610554818484610517565b505050565b5b818110156105785761056d600082610541565b60018101905061055a565b5050565b601f8211156105bd5761058e81610453565b61059784610468565b810160208510156105a6578190505b6105ba6105b285610468565b830182610559565b50505b505050565b600082821c905092915050565b60006105e0600019846008026105c2565b1980831691505092915050565b60006105f983836105cf565b9150826002028217905092915050565b610612826103e8565b67ffffffffffffffff81111561062b5761062a610158565b5b6106358254610422565b61064082828561057c565b600060209050601f8311600181146106735760008415610661578287015190505b61066b85826105ed565b8655506106d3565b601f19841661068186610453565b60005b828110156106a957848901518255600182019150602085019450602081019050610684565b868310156106c657848901516106c2601f8916826105cf565b8355505b6001600288020188555050505b505050505050565b608051612bfb6106f6600039600061061d0152612bfb6000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c806386fe212d116100c3578063c515ee231161007c578063c515ee23146103bb578063c6bbd5a7146103eb578063d9caed1214610409578063f2fde38b14610425578063f3fef3a314610455578063f912c64b1461048557610158565b806386fe212d146102f75780638705fcd4146103275780638da5cb5b1461034357806395d89b41146103615780639d23c4c71461037f578063a534150c1461039d57610158565b806331a5995d1161011557806331a5995d14610235578063412753581461025357806347e7ef241461027157806351cff8d91461028d57806353799c57146102bd57806369fe0e2d146102db57610158565b806301ffc9a71461015d57806306fdde031461018d57806318160ddd146101ab57806318cbbcfc146101c95780632c1758c1146101e7578063313ce56714610217575b600080fd5b61017760048036038101906101729190611f4e565b6104a1565b6040516101849190611f96565b60405180910390f35b61019561054f565b6040516101a29190612041565b60405180910390f35b6101b36105dd565b6040516101c0919061207c565b60405180910390f35b6101d16105e3565b6040516101de919061207c565b60405180910390f35b61020160048036038101906101fc91906120c3565b6105e8565b60405161020e9190611f96565b60405180910390f35b61021f61061b565b60405161022c919061207c565b60405180910390f35b61023d61063f565b60405161024a919061207c565b60405180910390f35b61025b610645565b6040516102689190612131565b60405180910390f35b61028b60048036038101906102869190612178565b61066b565b005b6102a760048036038101906102a291906121b8565b6106de565b6040516102b4919061207c565b60405180910390f35b6102c561077a565b6040516102d29190612131565b60405180910390f35b6102f560048036038101906102f091906120c3565b6107a0565b005b610311600480360381019061030c91906120c3565b6108ca565b60405161031e919061207c565b60405180910390f35b610341600480360381019061033c91906121b8565b6109b2565b005b61034b610ad1565b6040516103589190612131565b60405180910390f35b610369610af5565b6040516103769190612041565b60405180910390f35b610387610b83565b6040516103949190612131565b60405180910390f35b6103a5610ba9565b6040516103b2919061207c565b60405180910390f35b6103d560048036038101906103d091906121e5565b610baf565b6040516103e2919061207c565b60405180910390f35b6103f3610d9d565b6040516104009190612131565b60405180910390f35b610423600480360381019061041e91906121e5565b610dc3565b005b61043f600480360381019061043a91906121b8565b611249565b60405161044c9190611f96565b60405180910390f35b61046f600480360381019061046a9190612178565b61138b565b60405161047c919061207c565b60405180910390f35b61049f600480360381019061049a91906121b8565b611655565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036104d9576001905061054a565b639493f8b260e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361050f576001905061054a565b630d7491f860e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610545576001905061054a565b600090505b919050565b6006805461055c90612267565b80601f016020809104026020016040519081016040528092919081815260200182805461058890612267565b80156105d55780601f106105aa576101008083540402835291602001916105d5565b820191906000526020600020905b8154815290600101906020018083116105b857829003601f168201915b505050505081565b60085481565b600781565b6000600782106105f757600080fd5b6000820361060c576007600a54149050610616565b81600a5483161490505b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600a5481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106758282611774565b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62836040516106d2919061207c565b60405180910390a35050565b600080600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610772838261138b565b915050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6107ad600160ff166105e8565b156107ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e4906122e4565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461087b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087290612350565b60405180910390fd5b620f424081106108c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b7906123bc565b60405180910390fd5b8060048190555050565b60006007821115610910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090790612428565b60405180910390fd5b6000600a54831614610957576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094e90612494565b60405180910390fd5b81600a600082825417925050819055506007600a541415157f6b7e2e653f93b645d4ed7292d6429f96637084363e477c8aaea1a43ed13c284e600a546040516109a0919061207c565b60405180910390a2600a549050919050565b6109bf600260ff166105e8565b156109ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f6906122e4565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8490612350565b60405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610b0290612267565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2e90612267565b8015610b7b5780601f10610b5057610100808354040283529160200191610b7b565b820191906000526020600020905b815481529060010190602001808311610b5e57829003601f168201915b505050505081565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b600080606060008073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610c1657849350505050610d96565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16878787604051602401610c64939291906124b4565b6040516020818303038152906040527fdbb21d40000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610cee9190612532565b6000604051808303816000865af19150503d8060008114610d2b576040519150601f19603f3d011682016040523d82523d6000602084013e610d30565b606091505b50809350819450505082610d79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7090612595565b60405180910390fd5b81806020019051810190610d8d91906125ca565b90508093505050505b9392505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060606000806000610dd7888888610baf565b90508773ffffffffffffffffffffffffffffffffffffffff1630604051602401610e019190612656565b6040516020818303038152906040527f70a08231000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610e8b9190612532565b6000604051808303816000865af19150503d8060008114610ec8576040519150601f19603f3d011682016040523d82523d6000602084013e610ecd565b606091505b50809550819650505084610f16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0d906126bd565b60405180910390fd5b83806020019051810190610f2a91906125ca565b9250610f3581611964565b91508181610f43919061270c565b905080831015610f88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7f9061278c565b60405180910390fd5b610f928787611774565b8773ffffffffffffffffffffffffffffffffffffffff163382604051602401610fbc9291906127ac565b6040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516110469190612532565b6000604051808303816000865af19150503d8060008114611083576040519150601f19603f3d011682016040523d82523d6000602084013e611088565b606091505b508095508196505050846110d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c8906126bd565b60405180910390fd5b838060200190518101906110e59190612801565b945084611127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111e9061287a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111d45781600960008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111cc919061289a565b925050819055505b8673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd6d34547c69c5ee3d2667625c188acf1006abb93e0ee7cf03925c67cf77604138a89858760405161123794939291906128ce565b60405180910390a35050505050505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112a457600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36001915050919050565b6000806060600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611421576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141890612350565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168560405160240161146d9291906127ac565b6040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516114f79190612532565b6000604051808303816000865af19150503d8060008114611534576040519150601f19603f3d011682016040523d82523d6000602084013e611539565b606091505b50809250819350505081611582576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611579906126bd565b60405180910390fd5b808060200190518101906115969190612801565b9150816115d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115cf9061287a565b60405180910390fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f1314fd112a381beea61539dbd21ec04afcff2662ac7d1b83273aade1f53d1b9786866040516116429291906127ac565b60405180910390a2839250505092915050565b611662600460ff166105e8565b156116a2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611699906122e4565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611730576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172790612350565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600060606117a484600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611991565b6117ae8484611b6a565b8373ffffffffffffffffffffffffffffffffffffffff163330856040516024016117da93929190612913565b6040516020818303038152906040527f23b872dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516118649190612532565b6000604051808303816000865af19150503d80600081146118a1576040519150601f19603f3d011682016040523d82523d6000602084013e6118a6565b606091505b508092508193505050816118ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118e6906126bd565b60405180910390fd5b808060200190518101906119039190612801565b915081611945576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193c9061287a565b60405180910390fd5b8260086000828254611957919061289a565b9250508190555050505050565b60008060045483611975919061294a565b9050620f42408161198691906129bb565b905080915050919050565b60006060600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036119d0575050611b66565b8273ffffffffffffffffffffffffffffffffffffffff16846040516024016119f89190612131565b6040516020818303038152906040527f3ef25013000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611a829190612532565b6000604051808303816000865af19150503d8060008114611abf576040519150601f19603f3d011682016040523d82523d6000602084013e611ac4565b606091505b50809250819350505081611b0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b0490612a38565b60405180910390fd5b80806020019051810190611b219190612801565b915081611b63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5a90612aa4565b60405180910390fd5b50505b5050565b60006060600080600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611bd05750505050611eed565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168630604051602401611c1c929190612ac4565b6040516020818303038152906040527f23778613000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611ca69190612532565b6000604051808303816000865af19150503d8060008114611ce3576040519150601f19603f3d011682016040523d82523d6000602084013e611ce8565b606091505b50809450819550505083611d31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d2890612b39565b60405180910390fd5b82806020019051810190611d4591906125ca565b91508573ffffffffffffffffffffffffffffffffffffffff1630604051602401611d6f9190612656565b6040516020818303038152906040527f70a08231000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611df99190612532565b6000604051808303816000865af19150503d8060008114611e36576040519150601f19603f3d011682016040523d82523d6000602084013e611e3b565b606091505b50809450819550505083611e84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e7b906126bd565b60405180910390fd5b82806020019051810190611e9891906125ca565b9050818582611ea7919061289a565b1115611ee8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611edf90612ba5565b60405180910390fd5b505050505b5050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611f2b81611ef6565b8114611f3657600080fd5b50565b600081359050611f4881611f22565b92915050565b600060208284031215611f6457611f63611ef1565b5b6000611f7284828501611f39565b91505092915050565b60008115159050919050565b611f9081611f7b565b82525050565b6000602082019050611fab6000830184611f87565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611feb578082015181840152602081019050611fd0565b60008484015250505050565b6000601f19601f8301169050919050565b600061201382611fb1565b61201d8185611fbc565b935061202d818560208601611fcd565b61203681611ff7565b840191505092915050565b6000602082019050818103600083015261205b8184612008565b905092915050565b6000819050919050565b61207681612063565b82525050565b6000602082019050612091600083018461206d565b92915050565b6120a081612063565b81146120ab57600080fd5b50565b6000813590506120bd81612097565b92915050565b6000602082840312156120d9576120d8611ef1565b5b60006120e7848285016120ae565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061211b826120f0565b9050919050565b61212b81612110565b82525050565b60006020820190506121466000830184612122565b92915050565b61215581612110565b811461216057600080fd5b50565b6000813590506121728161214c565b92915050565b6000806040838503121561218f5761218e611ef1565b5b600061219d85828601612163565b92505060206121ae858286016120ae565b9150509250929050565b6000602082840312156121ce576121cd611ef1565b5b60006121dc84828501612163565b91505092915050565b6000806000606084860312156121fe576121fd611ef1565b5b600061220c86828701612163565b935050602061221d86828701612163565b925050604061222e868287016120ae565b9150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061227f57607f821691505b60208210810361229257612291612238565b5b50919050565b7f4552525f5345414c000000000000000000000000000000000000000000000000600082015250565b60006122ce600883611fbc565b91506122d982612298565b602082019050919050565b600060208201905081810360008301526122fd816122c1565b9050919050565b7f4552525f41585800000000000000000000000000000000000000000000000000600082015250565b600061233a600783611fbc565b915061234582612304565b602082019050919050565b600060208201905081810360008301526123698161232d565b9050919050565b7f4552525f4645455f544f4f5f4849474800000000000000000000000000000000600082015250565b60006123a6601083611fbc565b91506123b182612370565b602082019050919050565b600060208201905081810360008301526123d581612399565b9050919050565b7f4552525f494e56414c49445f5354415445000000000000000000000000000000600082015250565b6000612412601183611fbc565b915061241d826123dc565b602082019050919050565b6000602082019050818103600083015261244181612405565b9050919050565b7f4552525f414c52454144595f4c4f434b45440000000000000000000000000000600082015250565b600061247e601283611fbc565b915061248982612448565b602082019050919050565b600060208201905081810360008301526124ad81612471565b9050919050565b60006060820190506124c96000830186612122565b6124d66020830185612122565b6124e3604083018461206d565b949350505050565b600081519050919050565b600081905092915050565b600061250c826124eb565b61251681856124f6565b9350612526818560208601611fcd565b80840191505092915050565b600061253e8284612501565b915081905092915050565b7f4552525f51554f54455200000000000000000000000000000000000000000000600082015250565b600061257f600a83611fbc565b915061258a82612549565b602082019050919050565b600060208201905081810360008301526125ae81612572565b9050919050565b6000815190506125c481612097565b92915050565b6000602082840312156125e0576125df611ef1565b5b60006125ee848285016125b5565b91505092915050565b6000819050919050565b600061261c612617612612846120f0565b6125f7565b6120f0565b9050919050565b600061262e82612601565b9050919050565b600061264082612623565b9050919050565b61265081612635565b82525050565b600060208201905061266b6000830184612647565b92915050565b7f4552525f544f4b454e0000000000000000000000000000000000000000000000600082015250565b60006126a7600983611fbc565b91506126b282612671565b602082019050919050565b600060208201905081810360008301526126d68161269a565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061271782612063565b915061272283612063565b925082820390508181111561273a576127396126dd565b5b92915050565b7f4552525f42414c414e4345000000000000000000000000000000000000000000600082015250565b6000612776600b83611fbc565b915061278182612740565b602082019050919050565b600060208201905081810360008301526127a581612769565b9050919050565b60006040820190506127c16000830185612122565b6127ce602083018461206d565b9392505050565b6127de81611f7b565b81146127e957600080fd5b50565b6000815190506127fb816127d5565b92915050565b60006020828403121561281757612816611ef1565b5b6000612825848285016127ec565b91505092915050565b7f4552525f5452414e534645520000000000000000000000000000000000000000600082015250565b6000612864600c83611fbc565b915061286f8261282e565b602082019050919050565b6000602082019050818103600083015261289381612857565b9050919050565b60006128a582612063565b91506128b083612063565b92508282019050808211156128c8576128c76126dd565b5b92915050565b60006080820190506128e36000830187612122565b6128f0602083018661206d565b6128fd604083018561206d565b61290a606083018461206d565b95945050505050565b60006060820190506129286000830186612122565b6129356020830185612647565b612942604083018461206d565b949350505050565b600061295582612063565b915061296083612063565b925082820261296e81612063565b91508282048414831517612985576129846126dd565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006129c682612063565b91506129d183612063565b9250826129e1576129e061298c565b5b828204905092915050565b7f4552525f52454749535452590000000000000000000000000000000000000000600082015250565b6000612a22600c83611fbc565b9150612a2d826129ec565b602082019050919050565b60006020820190508181036000830152612a5181612a15565b9050919050565b7f4552525f554e415554485f544f4b454e00000000000000000000000000000000600082015250565b6000612a8e601083611fbc565b9150612a9982612a58565b602082019050919050565b60006020820190508181036000830152612abd81612a81565b9050919050565b6000604082019050612ad96000830185612122565b612ae66020830184612647565b9392505050565b7f4552525f4c494d49544552000000000000000000000000000000000000000000600082015250565b6000612b23600b83611fbc565b9150612b2e82612aed565b602082019050919050565b60006020820190508181036000830152612b5281612b16565b9050919050565b7f4552525f4c494d49540000000000000000000000000000000000000000000000600082015250565b6000612b8f600983611fbc565b9150612b9a82612b59565b602082019050919050565b60006020820190508181036000830152612bbe81612b82565b905091905056fea2646970667358221220fd26db00c0641f902f07712b0409c7884620be0f85452d6f44e791ad6d3a2c6064736f6c63430008190033 \ No newline at end of file +60a060405234801561001057600080fd5b5060405161344e38038061344e83398181016040528101906100329190610335565b84600690816100419190610609565b5083600790816100519190610609565b508260ff166080818152505081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050506106db565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61019082610147565b810181811067ffffffffffffffff821117156101af576101ae610158565b5b80604052505050565b60006101c2610129565b90506101ce8282610187565b919050565b600067ffffffffffffffff8211156101ee576101ed610158565b5b6101f782610147565b9050602081019050919050565b60005b83811015610222578082015181840152602081019050610207565b60008484015250505050565b600061024161023c846101d3565b6101b8565b90508281526020810184848401111561025d5761025c610142565b5b610268848285610204565b509392505050565b600082601f8301126102855761028461013d565b5b815161029584826020860161022e565b91505092915050565b600060ff82169050919050565b6102b48161029e565b81146102bf57600080fd5b50565b6000815190506102d1816102ab565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610302826102d7565b9050919050565b610312816102f7565b811461031d57600080fd5b50565b60008151905061032f81610309565b92915050565b600080600080600060a0868803121561035157610350610133565b5b600086015167ffffffffffffffff81111561036f5761036e610138565b5b61037b88828901610270565b955050602086015167ffffffffffffffff81111561039c5761039b610138565b5b6103a888828901610270565b94505060406103b9888289016102c2565b93505060606103ca88828901610320565b92505060806103db88828901610320565b9150509295509295909350565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061043a57607f821691505b60208210810361044d5761044c6103f3565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026104b57fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610478565b6104bf8683610478565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006105066105016104fc846104d7565b6104e1565b6104d7565b9050919050565b6000819050919050565b610520836104eb565b61053461052c8261050d565b848454610485565b825550505050565b600090565b61054961053c565b610554818484610517565b505050565b5b818110156105785761056d600082610541565b60018101905061055a565b5050565b601f8211156105bd5761058e81610453565b61059784610468565b810160208510156105a6578190505b6105ba6105b285610468565b830182610559565b50505b505050565b600082821c905092915050565b60006105e0600019846008026105c2565b1980831691505092915050565b60006105f983836105cf565b9150826002028217905092915050565b610612826103e8565b67ffffffffffffffff81111561062b5761062a610158565b5b6106358254610422565b61064082828561057c565b600060209050601f8311600181146106735760008415610661578287015190505b61066b85826105ed565b8655506106d3565b601f19841661068186610453565b60005b828110156106a957848901518255600182019150602085019450602081019050610684565b868310156106c657848901516106c2601f8916826105cf565b8355505b6001600288020188555050505b505050505050565b608051612d586106f660003960006106680152612d586000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806386fe212d116100de578063c515ee2311610097578063f2fde38b11610071578063f2fde38b14610440578063f3fef3a314610470578063f912c64b146104a0578063faaebd21146104bc57610173565b8063c515ee23146103d6578063c6bbd5a714610406578063d9caed121461042457610173565b806386fe212d146103125780638705fcd4146103425780638da5cb5b1461035e57806395d89b411461037c5780639d23c4c71461039a578063a534150c146103b857610173565b806331a5995d1161013057806331a5995d14610250578063412753581461026e57806347e7ef241461028c57806351cff8d9146102a857806353799c57146102d857806369fe0e2d146102f657610173565b806301ffc9a71461017857806306fdde03146101a857806318160ddd146101c657806318cbbcfc146101e45780632c1758c114610202578063313ce56714610232575b600080fd5b610192600480360381019061018d919061203f565b6104ec565b60405161019f9190612087565b60405180910390f35b6101b061059a565b6040516101bd9190612132565b60405180910390f35b6101ce610628565b6040516101db919061216d565b60405180910390f35b6101ec61062e565b6040516101f9919061216d565b60405180910390f35b61021c600480360381019061021791906121b4565b610633565b6040516102299190612087565b60405180910390f35b61023a610666565b604051610247919061216d565b60405180910390f35b61025861068a565b604051610265919061216d565b60405180910390f35b610276610690565b6040516102839190612222565b60405180910390f35b6102a660048036038101906102a19190612269565b6106b6565b005b6102c260048036038101906102bd91906122a9565b610729565b6040516102cf919061216d565b60405180910390f35b6102e06107c5565b6040516102ed9190612222565b60405180910390f35b610310600480360381019061030b91906121b4565b6107eb565b005b61032c600480360381019061032791906121b4565b610915565b604051610339919061216d565b60405180910390f35b61035c600480360381019061035791906122a9565b6109fd565b005b610366610b1c565b6040516103739190612222565b60405180910390f35b610384610b40565b6040516103919190612132565b60405180910390f35b6103a2610bce565b6040516103af9190612222565b60405180910390f35b6103c0610bf4565b6040516103cd919061216d565b60405180910390f35b6103f060048036038101906103eb91906122d6565b610bfa565b6040516103fd919061216d565b60405180910390f35b61040e610de8565b60405161041b9190612222565b60405180910390f35b61043e600480360381019061043991906122d6565b610e0e565b005b61045a600480360381019061045591906122a9565b611294565b6040516104679190612087565b60405180910390f35b61048a60048036038101906104859190612269565b6113d6565b604051610497919061216d565b60405180910390f35b6104ba60048036038101906104b591906122a9565b61172e565b005b6104d660048036038101906104d191906122a9565b61184d565b6040516104e3919061216d565b60405180910390f35b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036105245760019050610595565b639493f8b260e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361055a5760019050610595565b630d7491f860e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036105905760019050610595565b600090505b919050565b600680546105a790612358565b80601f01602080910402602001604051908101604052809291908181526020018280546105d390612358565b80156106205780601f106105f557610100808354040283529160200191610620565b820191906000526020600020905b81548152906001019060200180831161060357829003601f168201915b505050505081565b60085481565b600781565b60006007821061064257600080fd5b60008203610657576007600a54149050610661565b81600a5483161490505b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600a5481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106c08282611865565b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f628360405161071d919061216d565b60405180910390a35050565b600080600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506107bd83826113d6565b915050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6107f8600160ff16610633565b15610838576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082f906123d5565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108bd90612441565b60405180910390fd5b620f4240811061090b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610902906124ad565b60405180910390fd5b8060048190555050565b6000600782111561095b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095290612519565b60405180910390fd5b6000600a548316146109a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099990612585565b60405180910390fd5b81600a600082825417925050819055506007600a541415157f6b7e2e653f93b645d4ed7292d6429f96637084363e477c8aaea1a43ed13c284e600a546040516109eb919061216d565b60405180910390a2600a549050919050565b610a0a600260ff16610633565b15610a4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a41906123d5565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ad8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610acf90612441565b60405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054610b4d90612358565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7990612358565b8015610bc65780601f10610b9b57610100808354040283529160200191610bc6565b820191906000526020600020905b815481529060010190602001808311610ba957829003601f168201915b505050505081565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b600080606060008073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610c6157849350505050610de1565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16878787604051602401610caf939291906125a5565b6040516020818303038152906040527fdbb21d40000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610d399190612623565b6000604051808303816000865af19150503d8060008114610d76576040519150601f19603f3d011682016040523d82523d6000602084013e610d7b565b606091505b50809350819450505082610dc4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dbb90612686565b60405180910390fd5b81806020019051810190610dd891906126bb565b90508093505050505b9392505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060606000806000610e22888888610bfa565b90508773ffffffffffffffffffffffffffffffffffffffff1630604051602401610e4c9190612747565b6040516020818303038152906040527f70a08231000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610ed69190612623565b6000604051808303816000865af19150503d8060008114610f13576040519150601f19603f3d011682016040523d82523d6000602084013e610f18565b606091505b50809550819650505084610f61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f58906127ae565b60405180910390fd5b83806020019051810190610f7591906126bb565b9250610f8081611a55565b91508181610f8e91906127fd565b905080831015610fd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fca9061287d565b60405180910390fd5b610fdd8787611865565b8773ffffffffffffffffffffffffffffffffffffffff16338260405160240161100792919061289d565b6040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516110919190612623565b6000604051808303816000865af19150503d80600081146110ce576040519150601f19603f3d011682016040523d82523d6000602084013e6110d3565b606091505b5080955081965050508461111c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611113906127ae565b60405180910390fd5b8380602001905181019061113091906128f2565b945084611172576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111699061296b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461121f5781600960008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611217919061298b565b925050819055505b8673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd6d34547c69c5ee3d2667625c188acf1006abb93e0ee7cf03925c67cf77604138a89858760405161128294939291906129bf565b60405180910390a35050505050505050565b60008060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112ef57600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36001915050919050565b600080606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611469576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146090612a50565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036114fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f190612441565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168560405160240161154692919061289d565b6040516020818303038152906040527fa9059cbb000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516115d09190612623565b6000604051808303816000865af19150503d806000811461160d576040519150601f19603f3d011682016040523d82523d6000602084013e611612565b606091505b5080925081935050508161165b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611652906127ae565b60405180910390fd5b8080602001905181019061166f91906128f2565b9150816116b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a89061296b565b60405180910390fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f1314fd112a381beea61539dbd21ec04afcff2662ac7d1b83273aade1f53d1b97868660405161171b92919061289d565b60405180910390a2839250505092915050565b61173b600460ff16610633565b1561177b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611772906123d5565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611809576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180090612441565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60096020528060005260406000206000915090505481565b6000606061189584600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611a82565b61189f8484611c5b565b8373ffffffffffffffffffffffffffffffffffffffff163330856040516024016118cb93929190612a70565b6040516020818303038152906040527f23b872dd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516119559190612623565b6000604051808303816000865af19150503d8060008114611992576040519150601f19603f3d011682016040523d82523d6000602084013e611997565b606091505b508092508193505050816119e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d7906127ae565b60405180910390fd5b808060200190518101906119f491906128f2565b915081611a36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2d9061296b565b60405180910390fd5b8260086000828254611a48919061298b565b9250508190555050505050565b60008060045483611a669190612aa7565b9050620f424081611a779190612b18565b905080915050919050565b60006060600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611ac1575050611c57565b8273ffffffffffffffffffffffffffffffffffffffff1684604051602401611ae99190612222565b6040516020818303038152906040527f3ef25013000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611b739190612623565b6000604051808303816000865af19150503d8060008114611bb0576040519150601f19603f3d011682016040523d82523d6000602084013e611bb5565b606091505b50809250819350505081611bfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf590612b95565b60405180910390fd5b80806020019051810190611c1291906128f2565b915081611c54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4b90612c01565b60405180910390fd5b50505b5050565b60006060600080600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611cc15750505050611fde565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168630604051602401611d0d929190612c21565b6040516020818303038152906040527f23778613000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611d979190612623565b6000604051808303816000865af19150503d8060008114611dd4576040519150601f19603f3d011682016040523d82523d6000602084013e611dd9565b606091505b50809450819550505083611e22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e1990612c96565b60405180910390fd5b82806020019051810190611e3691906126bb565b91508573ffffffffffffffffffffffffffffffffffffffff1630604051602401611e609190612747565b6040516020818303038152906040527f70a08231000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611eea9190612623565b6000604051808303816000865af19150503d8060008114611f27576040519150601f19603f3d011682016040523d82523d6000602084013e611f2c565b606091505b50809450819550505083611f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6c906127ae565b60405180910390fd5b82806020019051810190611f8991906126bb565b9050818582611f98919061298b565b1115611fd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd090612d02565b60405180910390fd5b505050505b5050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61201c81611fe7565b811461202757600080fd5b50565b60008135905061203981612013565b92915050565b60006020828403121561205557612054611fe2565b5b60006120638482850161202a565b91505092915050565b60008115159050919050565b6120818161206c565b82525050565b600060208201905061209c6000830184612078565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156120dc5780820151818401526020810190506120c1565b60008484015250505050565b6000601f19601f8301169050919050565b6000612104826120a2565b61210e81856120ad565b935061211e8185602086016120be565b612127816120e8565b840191505092915050565b6000602082019050818103600083015261214c81846120f9565b905092915050565b6000819050919050565b61216781612154565b82525050565b6000602082019050612182600083018461215e565b92915050565b61219181612154565b811461219c57600080fd5b50565b6000813590506121ae81612188565b92915050565b6000602082840312156121ca576121c9611fe2565b5b60006121d88482850161219f565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061220c826121e1565b9050919050565b61221c81612201565b82525050565b60006020820190506122376000830184612213565b92915050565b61224681612201565b811461225157600080fd5b50565b6000813590506122638161223d565b92915050565b600080604083850312156122805761227f611fe2565b5b600061228e85828601612254565b925050602061229f8582860161219f565b9150509250929050565b6000602082840312156122bf576122be611fe2565b5b60006122cd84828501612254565b91505092915050565b6000806000606084860312156122ef576122ee611fe2565b5b60006122fd86828701612254565b935050602061230e86828701612254565b925050604061231f8682870161219f565b9150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061237057607f821691505b60208210810361238357612382612329565b5b50919050565b7f4552525f5345414c000000000000000000000000000000000000000000000000600082015250565b60006123bf6008836120ad565b91506123ca82612389565b602082019050919050565b600060208201905081810360008301526123ee816123b2565b9050919050565b7f4552525f41585800000000000000000000000000000000000000000000000000600082015250565b600061242b6007836120ad565b9150612436826123f5565b602082019050919050565b6000602082019050818103600083015261245a8161241e565b9050919050565b7f4552525f4645455f544f4f5f4849474800000000000000000000000000000000600082015250565b60006124976010836120ad565b91506124a282612461565b602082019050919050565b600060208201905081810360008301526124c68161248a565b9050919050565b7f4552525f494e56414c49445f5354415445000000000000000000000000000000600082015250565b60006125036011836120ad565b915061250e826124cd565b602082019050919050565b60006020820190508181036000830152612532816124f6565b9050919050565b7f4552525f414c52454144595f4c4f434b45440000000000000000000000000000600082015250565b600061256f6012836120ad565b915061257a82612539565b602082019050919050565b6000602082019050818103600083015261259e81612562565b9050919050565b60006060820190506125ba6000830186612213565b6125c76020830185612213565b6125d4604083018461215e565b949350505050565b600081519050919050565b600081905092915050565b60006125fd826125dc565b61260781856125e7565b93506126178185602086016120be565b80840191505092915050565b600061262f82846125f2565b915081905092915050565b7f4552525f51554f54455200000000000000000000000000000000000000000000600082015250565b6000612670600a836120ad565b915061267b8261263a565b602082019050919050565b6000602082019050818103600083015261269f81612663565b9050919050565b6000815190506126b581612188565b92915050565b6000602082840312156126d1576126d0611fe2565b5b60006126df848285016126a6565b91505092915050565b6000819050919050565b600061270d612708612703846121e1565b6126e8565b6121e1565b9050919050565b600061271f826126f2565b9050919050565b600061273182612714565b9050919050565b61274181612726565b82525050565b600060208201905061275c6000830184612738565b92915050565b7f4552525f544f4b454e0000000000000000000000000000000000000000000000600082015250565b60006127986009836120ad565b91506127a382612762565b602082019050919050565b600060208201905081810360008301526127c78161278b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061280882612154565b915061281383612154565b925082820390508181111561282b5761282a6127ce565b5b92915050565b7f4552525f42414c414e4345000000000000000000000000000000000000000000600082015250565b6000612867600b836120ad565b915061287282612831565b602082019050919050565b600060208201905081810360008301526128968161285a565b9050919050565b60006040820190506128b26000830185612213565b6128bf602083018461215e565b9392505050565b6128cf8161206c565b81146128da57600080fd5b50565b6000815190506128ec816128c6565b92915050565b60006020828403121561290857612907611fe2565b5b6000612916848285016128dd565b91505092915050565b7f4552525f5452414e534645520000000000000000000000000000000000000000600082015250565b6000612955600c836120ad565b91506129608261291f565b602082019050919050565b6000602082019050818103600083015261298481612948565b9050919050565b600061299682612154565b91506129a183612154565b92508282019050808211156129b9576129b86127ce565b5b92915050565b60006080820190506129d46000830187612213565b6129e1602083018661215e565b6129ee604083018561215e565b6129fb606083018461215e565b95945050505050565b7f4552525f4f574e45520000000000000000000000000000000000000000000000600082015250565b6000612a3a6009836120ad565b9150612a4582612a04565b602082019050919050565b60006020820190508181036000830152612a6981612a2d565b9050919050565b6000606082019050612a856000830186612213565b612a926020830185612738565b612a9f604083018461215e565b949350505050565b6000612ab282612154565b9150612abd83612154565b9250828202612acb81612154565b91508282048414831517612ae257612ae16127ce565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612b2382612154565b9150612b2e83612154565b925082612b3e57612b3d612ae9565b5b828204905092915050565b7f4552525f52454749535452590000000000000000000000000000000000000000600082015250565b6000612b7f600c836120ad565b9150612b8a82612b49565b602082019050919050565b60006020820190508181036000830152612bae81612b72565b9050919050565b7f4552525f554e415554485f544f4b454e00000000000000000000000000000000600082015250565b6000612beb6010836120ad565b9150612bf682612bb5565b602082019050919050565b60006020820190508181036000830152612c1a81612bde565b9050919050565b6000604082019050612c366000830185612213565b612c436020830184612738565b9392505050565b7f4552525f4c494d49544552000000000000000000000000000000000000000000600082015250565b6000612c80600b836120ad565b9150612c8b82612c4a565b602082019050919050565b60006020820190508181036000830152612caf81612c73565b9050919050565b7f4552525f4c494d49540000000000000000000000000000000000000000000000600082015250565b6000612cec6009836120ad565b9150612cf782612cb6565b602082019050919050565b60006020820190508181036000830152612d1b81612cdf565b905091905056fea2646970667358221220a4fb2492a9ae6fc7bbe1da1c16fad8c402355ad8c5d78db2bfbb495d38c6da7a64736f6c63430008190033 \ No newline at end of file diff --git a/python/erc20_pool/data/SwapPool.json b/python/erc20_pool/data/SwapPool.json index 0b0de68..4331bfb 100644 --- a/python/erc20_pool/data/SwapPool.json +++ b/python/erc20_pool/data/SwapPool.json @@ -1 +1 @@ -[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"address","name":"_tokenRegistry","type":"address"},{"internalType":"address","name":"_tokenLimiter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeAddress","type":"address"},{"indexed":false,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"Collect","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"_final","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_sealState","type":"uint256"}],"name":"SealStateChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Swap","type":"event"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePpm","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"},{"internalType":"address","name":"_inToken","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"getQuote","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"isSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quoter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"seal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_quoter","type":"address"}],"name":"setQuoter","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenLimiter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"},{"internalType":"address","name":"_inToken","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}] +[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"address","name":"_tokenRegistry","type":"address"},{"internalType":"address","name":"_tokenLimiter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeAddress","type":"address"},{"indexed":false,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"Collect","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"_final","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_sealState","type":"uint256"}],"name":"SealStateChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Swap","type":"event"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePpm","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"fees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"},{"internalType":"address","name":"_inToken","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"getQuote","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"isSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quoter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"seal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_quoter","type":"address"}],"name":"setQuoter","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenLimiter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"},{"internalType":"address","name":"_inToken","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}] diff --git a/python/erc20_pool/data/SwapPool.metadata.json b/python/erc20_pool/data/SwapPool.metadata.json index 15d5360..b8dd8ae 100644 --- a/python/erc20_pool/data/SwapPool.metadata.json +++ b/python/erc20_pool/data/SwapPool.metadata.json @@ -1 +1 @@ -{"compiler":{"version":"0.8.25+commit.b61c2a91"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"address","name":"_tokenRegistry","type":"address"},{"internalType":"address","name":"_tokenLimiter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeAddress","type":"address"},{"indexed":false,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"Collect","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"_final","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_sealState","type":"uint256"}],"name":"SealStateChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Swap","type":"event"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePpm","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"},{"internalType":"address","name":"_inToken","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"getQuote","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"isSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quoter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"seal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_quoter","type":"address"}],"name":"setQuoter","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenLimiter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"},{"internalType":"address","name":"_inToken","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"SwapPool.sol":"SwapPool"},"evmVersion":"istanbul","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"SwapPool.sol":{"keccak256":"0x84ae83601233a5b9c0bfe064344c90481e9e1b7fbc5ba32042e26b82520c8f26","license":"AGPL-3.0-or-later","urls":["bzz-raw://1ee302af4461147a2b0fe3c5c8e66daa5a8e9a19520739889f004d1ea8714921","dweb:/ipfs/QmYEybNUwfqWVhn8MzRXcLqBXjjV7vyqiQNhfHW8N4CgLM"]}},"version":1} +{"compiler":{"version":"0.8.25+commit.b61c2a91"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"address","name":"_tokenRegistry","type":"address"},{"internalType":"address","name":"_tokenLimiter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeAddress","type":"address"},{"indexed":false,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"Collect","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"_final","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_sealState","type":"uint256"}],"name":"SealStateChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Swap","type":"event"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePpm","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"fees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"},{"internalType":"address","name":"_inToken","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"getQuote","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"isSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quoter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"seal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_quoter","type":"address"}],"name":"setQuoter","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenLimiter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"},{"internalType":"address","name":"_inToken","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outToken","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"SwapPool.sol":"SwapPool"},"evmVersion":"istanbul","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"SwapPool.sol":{"keccak256":"0x3dfc6ebc8d007e726a6b4cff3dbf90cc6f108e007ceae407ff0f025009e0ce45","license":"AGPL-3.0-or-later","urls":["bzz-raw://7fb8f6dd21d0704c7145895e7c3aa0541f349d8d84fa9d826afa79016e322aa0","dweb:/ipfs/QmVR8GhA8JHVVMe3MHg1A2QoScecjYi4vKhkBUXKbWRuUK"]}},"version":1} diff --git a/solidity/SwapPool.sol b/solidity/SwapPool.sol index 158663f..081f22d 100644 --- a/solidity/SwapPool.sol +++ b/solidity/SwapPool.sol @@ -21,7 +21,7 @@ contract SwapPool { uint256 public totalSupply; - mapping ( address => uint256 ) fees; + mapping ( address => uint256 ) public fees; // Implements Seal uint256 public sealState; @@ -211,6 +211,7 @@ contract SwapPool { bool r; bytes memory v; + require(msg.sender == owner, "ERR_OWNER"); require(feeAddress != address(0), "ERR_AXX"); (r, v) = _outToken.call(abi.encodeWithSignature('transfer(address,uint256)', feeAddress, _value));