From 555b0b17244099ee653871aa51a20a700e353029 Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 10 Feb 2023 05:02:24 +0000 Subject: [PATCH] Rehabilitate change period --- .../data/DemurrageTokenSingleNocap.bin | 2 +- .../data/DemurrageTokenSingleNocap.json | 2 +- python/erc20_demurrage_token/token.py | 51 +++-- python/tests/test_period.py | 13 +- python/tests/test_single.py | 9 +- solidity/DemurrageTokenSingleNocap.sol | 190 +++++++++--------- 6 files changed, 138 insertions(+), 129 deletions(-) diff --git a/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.bin b/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.bin index a12d65d..27592f6 100644 --- a/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.bin +++ b/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.bin @@ -1 +1 @@ -60c06040523480156200001157600080fd5b5060405162004fb238038062004fb28339818101604052810190620000379190620008f7565b6801000000000000000083600f0b126200005057600080fd5b6200005a6200060f565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600e6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550866006908162000126919062000c18565b50856007908162000138919062000c18565b508460ff166008819055504260038190555060035460808181525050603c8362000163919062000d2e565b60a081815250506200018a6001620003506401000000000262002192176401000000009004565b600260006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550620001e4846200037764010000000002620021b8176401000000009004565b600d60006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550620002556000600260009054906101000a9004600f0b64ffffffffff1660006001620003cb640100000000026401000000009004565b90506000819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548164ffffffffff021916908364ffffffffff160217905550505081601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000d79565b6000677fffffffffffffff8211156200036857600080fd5b6040829060020a029050919050565b60008082600f0b136200038957600080fd5b60806fb17217f7d1cf79abc9e3b39803f2f6af620003b6846200043f640100000000026401000000009004565b600f0b02908060020a82049150509050919050565b620003d56200060f565b620003df6200060f565b82816000019063ffffffff16908163ffffffff168152505083816020019068ffffffffffffffffff16908168ffffffffffffffffff168152505084816040019064ffffffffff16908164ffffffffff168152505080915050949350505050565b60008082600f0b136200045157600080fd5b60008083600f0b90506801000000000000000081126200048d576040819060008212600003808260020a82851804189250505090506040820191505b6401000000008112620004bc576020819060008212600003808260020a82851804189250505090506020820191505b620100008112620004e9576010819060008212600003808260020a82851804189250505090506010820191505b610100811262000515576008819060008212600003808260020a82851804189250505090506008820191505b6010811262000540576004819060008212600003808260020a82851804189250505090506004820191505b600481126200056b576002819060008212600003808260020a82851804189250505090506002820191505b600281126200057b576001820191505b600060408084039060020a029050600083607f0386600f0b9060020a029050600067800000000000000090505b600081131562000602578182029150600060ff83908060020a8204915050905080607f0183908060020a8204915050925080820284019350506001819060008212600003808260020a8285180418925050509050620005a8565b5081945050505050919050565b6040518060600160405280600063ffffffff168152602001600068ffffffffffffffffff168152602001600064ffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620006b18262000666565b810181811067ffffffffffffffff82111715620006d357620006d262000677565b5b80604052505050565b6000620006e862000648565b9050620006f68282620006a6565b919050565b600067ffffffffffffffff82111562000719576200071862000677565b5b620007248262000666565b9050602081019050919050565b60005b838110156200075157808201518184015260208101905062000734565b60008484015250505050565b6000620007746200076e84620006fb565b620006dc565b90508281526020810184848401111562000793576200079262000661565b5b620007a084828562000731565b509392505050565b600082601f830112620007c057620007bf6200065c565b5b8151620007d28482602086016200075d565b91505092915050565b600060ff82169050919050565b620007f381620007db565b8114620007ff57600080fd5b50565b6000815190506200081381620007e8565b92915050565b600081600f0b9050919050565b620008318162000819565b81146200083d57600080fd5b50565b600081519050620008518162000826565b92915050565b6000819050919050565b6200086c8162000857565b81146200087857600080fd5b50565b6000815190506200088c8162000861565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620008bf8262000892565b9050919050565b620008d181620008b2565b8114620008dd57600080fd5b50565b600081519050620008f181620008c6565b92915050565b60008060008060008060c0878903121562000917576200091662000652565b5b600087015167ffffffffffffffff81111562000938576200093762000657565b5b6200094689828a01620007a8565b965050602087015167ffffffffffffffff8111156200096a576200096962000657565b5b6200097889828a01620007a8565b95505060406200098b89828a0162000802565b94505060606200099e89828a0162000840565b9350506080620009b189828a016200087b565b92505060a0620009c489828a01620008e0565b9150509295509295509295565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062000a2457607f821691505b60208210810362000a3a5762000a39620009dc565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b60006008830262000aa77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000a65565b62000ab3868362000a65565b95508019841693508086168417925050509392505050565b6000819050919050565b600062000af662000af062000aea8462000857565b62000acb565b62000857565b9050919050565b6000819050919050565b62000b128362000ad5565b62000b2a62000b218262000afd565b84845462000a75565b825550505050565b600090565b62000b4162000b32565b62000b4e81848462000b07565b505050565b5b8181101562000b765762000b6a60008262000b37565b60018101905062000b54565b5050565b601f82111562000bc55762000b8f8162000a40565b62000b9a8462000a55565b8101602085101562000baa578190505b62000bc262000bb98562000a55565b83018262000b53565b50505b505050565b60008160020a8304905092915050565b600062000bed6000198460080262000bca565b1980831691505092915050565b600062000c08838362000bda565b9150826002028217905092915050565b62000c2382620009d1565b67ffffffffffffffff81111562000c3f5762000c3e62000677565b5b62000c4b825462000a0b565b62000c5882828562000b7a565b600060209050601f83116001811462000c90576000841562000c7b578287015190505b62000c87858262000bfa565b86555062000cf7565b601f19841662000ca08662000a40565b60005b8281101562000cca5784890151825560018201915060208501945060208101905062000ca3565b8683101562000cea578489015162000ce6601f89168262000bda565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000d3b8262000857565b915062000d488362000857565b925082820262000d588162000857565b9150828204841483151762000d725762000d7162000cff565b5b5092915050565b60805160a0516141f762000dbb600039600081816115d401528181611e530152611ff801526000818161160001528181612019015261205e01526141f76000f3fe608060405234801561001057600080fd5b50600436106102a7576000357c010000000000000000000000000000000000000000000000000000000090048063731f237c11610179578063983b2d56116100eb578063d4792037116100a4578063d4792037146108c0578063d89135cd146108f0578063e80952951461090e578063eda4e6d61461092c578063f2fde38b1461094a578063f83da35d1461097a576102a7565b8063983b2d56146107c4578063a457c2d7146107f4578063a9059cbb14610824578063b470aade14610854578063c0ab707714610872578063d340ef8a146108a2576102a7565b80638b8ff2d61161013d5780638b8ff2d6146107025780638da5cb5b146107325780638f0b2d5d146107505780638f1df6bc1461076c57806394c8a69a1461077657806395d89b41146107a6576102a7565b8063731f237c1461066c57806373f425611461068a57806374bedb95146106a857806379ba5097146106c657806384dde4af146106e4576102a7565b8063313ce5671161021d5780634abfbba2116101d65780634abfbba21461055e57806351b4541c1461058e57806358b2833b146105be5780636787a9be146105dc5780636a2d094e1461060c57806370a082311461063c576102a7565b8063313ce56714610462578063395093511461048057806340452d91146104b057806342966c68146104e2578063449a52f8146104fe57806347a505171461052e576102a7565b806318160ddd1161026f57806318160ddd146103785780631989c6a814610396578063229ba197146103b457806323b872dd146103d25780633092afd5146104025780633133348714610432576102a7565b806301ffc9a7146102ac57806306fdde03146102dc578063095ea7b3146102fa57806309f28f3c1461032a57806310a10f3714610348575b600080fd5b6102c660048036038101906102c191906137ee565b6109aa565b6040516102d39190613836565b60405180910390f35b6102e4610b50565b6040516102f191906138e1565b60405180910390f35b610314600480360381019061030f9190613997565b610bde565b6040516103219190613836565b60405180910390f35b610332610dae565b60405161033f91906139f3565b60405180910390f35b610362600480360381019061035d9190613bac565b610dc1565b60405161036f9190613be8565b60405180910390f35b610380610dd5565b60405161038d9190613be8565b60405180910390f35b61039e610dec565b6040516103ab9190613be8565b60405180910390f35b6103bc610df8565b6040516103c991906139f3565b60405180910390f35b6103ec60048036038101906103e79190613c03565b610e0b565b6040516103f99190613836565b60405180910390f35b61041c60048036038101906104179190613c56565b610fbd565b6040516104299190613836565b60405180910390f35b61044c60048036038101906104479190613c83565b6110b0565b6040516104599190613be8565b60405180910390f35b61046a61111c565b6040516104779190613be8565b60405180910390f35b61049a60048036038101906104959190613997565b611122565b6040516104a79190613836565b60405180910390f35b6104ca60048036038101906104c59190613cc3565b6112b7565b6040516104d993929190613d1d565b60405180910390f35b6104fc60048036038101906104f79190613cc3565b611323565b005b61051860048036038101906105139190613997565b611448565b6040516105259190613836565b60405180910390f35b61054860048036038101906105439190613c56565b611587565b6040516105559190613be8565b60405180910390f35b61057860048036038101906105739190613cc3565b6115d0565b6040516105859190613be8565b60405180910390f35b6105a860048036038101906105a39190613cc3565b611630565b6040516105b59190613be8565b60405180910390f35b6105c6611651565b6040516105d39190613be8565b60405180910390f35b6105f660048036038101906105f19190613cc3565b611657565b6040516106039190613be8565b60405180910390f35b61062660048036038101906106219190613cc3565b611698565b6040516106339190613be8565b60405180910390f35b61065660048036038101906106519190613c56565b6116b9565b6040516106639190613be8565b60405180910390f35b610674611720565b6040516106819190613be8565b60405180910390f35b610692611731565b60405161069f9190613be8565b60405180910390f35b6106b0611737565b6040516106bd9190613be8565b60405180910390f35b6106ce61173d565b6040516106db9190613836565b60405180910390f35b6106ec6118e4565b6040516106f99190613d63565b60405180910390f35b61071c60048036038101906107179190613bac565b61190a565b6040516107299190613be8565b60405180910390f35b61073a61191f565b6040516107479190613d63565b60405180910390f35b61076a60048036038101906107659190613c56565b611945565b005b6107746119e3565b005b610790600480360381019061078b9190613bac565b6119ee565b60405161079d9190613836565b60405180910390f35b6107ae611a53565b6040516107bb91906138e1565b60405180910390f35b6107de60048036038101906107d99190613c56565b611ae1565b6040516107eb9190613836565b60405180910390f35b61080e60048036038101906108099190613997565b611b9e565b60405161081b9190613836565b60405180910390f35b61083e60048036038101906108399190613997565b611dbc565b60405161084b9190613836565b60405180910390f35b61085c611e51565b6040516108699190613be8565b60405180910390f35b61088c60048036038101906108879190613cc3565b611e75565b6040516108999190613be8565b60405180910390f35b6108aa611fc9565b6040516108b79190613be8565b60405180910390f35b6108da60048036038101906108d59190613bac565b611fcf565b6040516108e79190613be8565b60405180910390f35b6108f8611fe8565b6040516109059190613be8565b60405180910390f35b610916611ff2565b6040516109239190613da9565b60405180910390f35b61093461205c565b6040516109419190613be8565b60405180910390f35b610964600480360381019061095f9190613c56565b612080565b6040516109719190613836565b60405180910390f35b610994600480360381019061098f9190613dc4565b612122565b6040516109a19190613e9a565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036109fe5760019050610b4b565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610a505760019050610b4b565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610aa25760019050610b4b565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610af45760019050610b4b565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610b465760019050610b4b565b600090505b919050565b60068054610b5d90613ee4565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8990613ee4565b8015610bd65780601f10610bab57610100808354040283529160200191610bd6565b820191906000526020600020905b815481529060010190602001808311610bb957829003601f168201915b505050505081565b6000806000600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115610caa5760008314610ca9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca090613f61565b60405180910390fd5b5b610cb26119e3565b610cbb83611657565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610d9b9190613be8565b60405180910390a3600191505092915050565b600260009054906101000a9004600f0b81565b6000816000015163ffffffff169050919050565b6000600c54600954610de79190613fb0565b905090565b60008080549050905090565b600d60009054906101000a9004600f0b81565b6000806000610e186119e3565b610e2184611657565b915081600f60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610eac57600080fd5b81600f60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f389190613fb0565b92505081905550610f4a8686846121fa565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610fa99190613be8565b60405180910390a380925050509392505050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061104657503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b61104f57600080fd5b6000600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000806000806110bf86612192565b92506110ca85612192565b91506110e5600d60009054906101000a9004600f0b8361221f565b90506110f08161229e565b90506110fc838261221f565b90506111078161232b565b67ffffffffffffffff16935050505092915050565b60085481565b60008061112d6119e3565b61113683611657565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111c49190613fe4565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040516112a49190613be8565b60405180910390a3600191505092915050565b600081815481106112c757600080fd5b906000526020600020016000915090508060000160009054906101000a900463ffffffff16908060000160049054906101000a900468ffffffffffffffffff169080600001600d9054906101000a900464ffffffffff16905083565b600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661137957600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548111156113c557600080fd5b60006113d082611657565b90506113dc3382612360565b5081600c60008282546113ef9190613fe4565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405161143c9190613be8565b60405180910390a25050565b600080600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166114d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ce90614064565b60405180910390fd5b6114df6119e3565b6114e883611657565b905082600960008282546114fc9190613fe4565b9250508190555061150d8482612467565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161156b9190613be8565b60405180910390a361157b61252b565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f0000000000000000000000000000000000000000000000000000000000000000826115fe9190614084565b7f00000000000000000000000000000000000000000000000000000000000000006116299190613fe4565b9050919050565b6000603c82426116409190613fb0565b61164a91906140f5565b9050919050565b60035481565b60008061167b61166684612192565b600260009054906101000a9004600f0b6126e0565b90506116868161232b565b67ffffffffffffffff16915050919050565b6000603c82426116a89190613fb0565b6116b291906140f5565b9050919050565b6000806000806116d06116cb86611587565b612192565b92506116dd600354611630565b90506116f883600260009054906101000a9004600f0b61221f565b91506117166117068361232b565b67ffffffffffffffff16826110b0565b9350505050919050565b600061172c6000611e75565b905090565b600c5481565b600b5481565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461179a57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000816040015164ffffffffff169050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461199f57600080fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6119eb611720565b50565b600080826000015163ffffffff161115611a0b5760009050611a4e565b6000826020015168ffffffffffffffffff161115611a2c5760009050611a4e565b6000826040015164ffffffffff161115611a495760009050611a4e565b600190505b919050565b60078054611a6090613ee4565b80601f0160208091040260200160405190810160405280929190818152602001828054611a8c90613ee4565b8015611ad95780601f10611aae57610100808354040283529160200191611ad9565b820191906000526020600020905b815481529060010190602001808311611abc57829003601f168201915b505050505081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b3d57600080fd5b6001600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600080611baa83611657565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015611c3557600080fd5b611c3d6119e3565b80600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611cc99190613fb0565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054604051611da99190613be8565b60405180910390a3600191505092915050565b6000806000611dc96119e3565b611dd284611657565b9150611ddf3386846121fa565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051611e3e9190613be8565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000806000611e88600354611630565b925060008303611e9f576000945050505050611fc4565b600260009054906101000a9004600f0b9050600086118015611ec057508286105b15611ec9578592505b611ed283612192565b9150611eed600d60009054906101000a9004600f0b8361221f565b9350611ef88461229e565b9350611f13600260009054906101000a9004600f0b8561221f565b600260006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550603c83611f5b9190614084565b600354611f689190613fe4565b60038190555080600f0b836003547f1c9c74563c32efd114cb36fb5e432d9386c8254d08456614804a33a3088ab736600260009054906101000a9004600f0b604051611fb491906139f3565b60405180910390a4829450505050505b919050565b600a5481565b6000816020015168ffffffffffffffffff169050919050565b6000600c54905090565b600060017f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000426120439190613fb0565b61204d91906140f5565b6120579190613fe4565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146120dc57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b61212a61374e565b61213261374e565b82816000019063ffffffff16908163ffffffff168152505083816020019068ffffffffffffffffff16908168ffffffffffffffffff168152505084816040019064ffffffffff16908164ffffffffff168152505080915050949350505050565b6000677fffffffffffffff8211156121a957600080fd5b6040829060020a029050919050565b60008082600f0b136121c957600080fd5b60806fb17217f7d1cf79abc9e3b39803f2f6af6121e58461276c565b600f0b02908060020a82049150509050919050565b6000806122078584612360565b506122128484612467565b5060019150509392505050565b600080604083600f0b85600f0b029060008212600003808260020a82851804189250505090507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b811215801561228b57506f7fffffffffffffffffffffffffffffff600f0b8113155b61229457600080fd5b8091505092915050565b60006840000000000000000082600f0b126122b857600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b12156122ec5760009050612326565b6123236080700171547652b82fe1777d0ffda0d23a7d1284600f0b029060008212600003808260020a828518041892505050612932565b90505b919050565b60008082600f0b121561233d57600080fd5b604082600f0b9060008212600003808260020a8285180418925050509050919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600085036123bc5760009350505050612461565b6123c586611587565b92508483101561240a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240190614172565b60405180910390fd5b84836124169190613fb0565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600085036124c35760009350505050612525565b6124cc86611587565b925084836124da9190613fe4565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b600061253561374e565b600061253f610dd5565b9050600060016000805490506125559190613fb0565b8154811061256657612565614192565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900464ffffffffff1664ffffffffff1664ffffffffff1681525050915080826020019068ffffffffffffffffff16908168ffffffffffffffffff168152505081600060016000805490506126389190613fb0565b8154811061264957612648614192565b5b9060005260206000200160008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548164ffffffffff021916908364ffffffffff16021790555090505060019250505090565b60008082600f0b036126f157600080fd5b600082600f0b604085600f0b9060020a02816127105761270f6140c6565b5b0590507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b811215801561275957506f7fffffffffffffffffffffffffffffff600f0b8113155b61276257600080fd5b8091505092915050565b60008082600f0b1361277d57600080fd5b60008083600f0b90506801000000000000000081126127b8576040819060008212600003808260020a82851804189250505090506040820191505b64010000000081126127e6576020819060008212600003808260020a82851804189250505090506020820191505b620100008112612812576010819060008212600003808260020a82851804189250505090506010820191505b610100811261283d576008819060008212600003808260020a82851804189250505090506008820191505b60108112612867576004819060008212600003808260020a82851804189250505090506004820191505b60048112612891576002819060008212600003808260020a82851804189250505090506002820191505b600281126128a0576001820191505b600060408084039060020a029050600083607f0386600f0b9060020a029050600067800000000000000090505b6000811315612925578182029150600060ff83908060020a8204915050905080607f0183908060020a8204915050925080820284019350506001819060008212600003808260020a82851804189250505090506128cd565b5081945050505050919050565b60006840000000000000000082600f0b1261294c57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b12156129805760009050613749565b60006f80000000000000000000000000000000905060006780000000000000008416600f0b13156129ce57608070016a09e667f3bcc908b2fb1366ea957d3e8202908060020a820491505090505b60006740000000000000008416600f0b1315612a075760807001306fe0a31b7152de8d5a46305c85edec8202908060020a820491505090505b60006720000000000000008416600f0b1315612a405760807001172b83c7d517adcdf7c8c50eb14a791f8202908060020a820491505090505b60006710000000000000008416600f0b1315612a7957608070010b5586cf9890f6298b92b71842a983638202908060020a820491505090505b60006708000000000000008416600f0b1315612ab25760807001059b0d31585743ae7c548eb68ca417fd8202908060020a820491505090505b60006704000000000000008416600f0b1315612aeb576080700102c9a3e778060ee6f7caca4f7a29bde88202908060020a820491505090505b60006702000000000000008416600f0b1315612b2457608070010163da9fb33356d84a66ae336dcdfa3f8202908060020a820491505090505b60006701000000000000008416600f0b1315612b5d576080700100b1afa5abcbed6129ab13ec11dc95438202908060020a820491505090505b600066800000000000008416600f0b1315612b9557608070010058c86da1c09ea1ff19d294cf2f679b8202908060020a820491505090505b600066400000000000008416600f0b1315612bcd5760807001002c605e2e8cec506d21bfc89a23a00f8202908060020a820491505090505b600066200000000000008416600f0b1315612c05576080700100162f3904051fa128bca9c55c31e5df8202908060020a820491505090505b600066100000000000008416600f0b1315612c3d5760807001000b175effdc76ba38e31671ca9397258202908060020a820491505090505b600066080000000000008416600f0b1315612c75576080700100058ba01fb9f96d6cacd4b180917c3d8202908060020a820491505090505b600066040000000000008416600f0b1315612cad57608070010002c5cc37da9491d0985c348c68e7b38202908060020a820491505090505b600066020000000000008416600f0b1315612ce55760807001000162e525ee054754457d59952920268202908060020a820491505090505b600066010000000000008416600f0b1315612d1d57608070010000b17255775c040618bf4a4ade83fc8202908060020a820491505090505b6000658000000000008416600f0b1315612d545760807001000058b91b5bc9ae2eed81e9b7d4cfab8202908060020a820491505090505b6000654000000000008416600f0b1315612d8b576080700100002c5c89d5ec6ca4d7c8acc017b7c98202908060020a820491505090505b6000652000000000008416600f0b1315612dc257608070010000162e43f4f831060e02d839a9d16d8202908060020a820491505090505b6000651000000000008416600f0b1315612df9576080700100000b1721bcfc99d9f890ea069117638202908060020a820491505090505b6000650800000000008416600f0b1315612e3057608070010000058b90cf1e6d97f9ca14dbcc16288202908060020a820491505090505b6000650400000000008416600f0b1315612e675760807001000002c5c863b73f016468f6bac5ca2b8202908060020a820491505090505b6000650200000000008416600f0b1315612e9e576080700100000162e430e5a18f6119e3c02282a58202908060020a820491505090505b6000650100000000008416600f0b1315612ed55760807001000000b1721835514b86e6d96efd1bfe8202908060020a820491505090505b60006480000000008416600f0b1315612f0b576080700100000058b90c0b48c6be5df846c5b2ef8202908060020a820491505090505b60006440000000008416600f0b1315612f4157608070010000002c5c8601cc6b9e94213c72737a8202908060020a820491505090505b60006420000000008416600f0b1315612f775760807001000000162e42fff037df38aa2b219f068202908060020a820491505090505b60006410000000008416600f0b1315612fad57608070010000000b17217fba9c739aa5819f44f98202908060020a820491505090505b60006408000000008416600f0b1315612fe35760807001000000058b90bfcdee5acd3c1cedc8238202908060020a820491505090505b60006404000000008416600f0b1315613019576080700100000002c5c85fe31f35a6a30da1be508202908060020a820491505090505b60006402000000008416600f0b131561304f57608070010000000162e42ff0999ce3541b9fffcf8202908060020a820491505090505b60006401000000008416600f0b1315613085576080700100000000b17217f80f4ef5aadda455548202908060020a820491505090505b600063800000008416600f0b13156130ba57608070010000000058b90bfbf8479bd5a81b51ad8202908060020a820491505090505b600063400000008416600f0b13156130ef5760807001000000002c5c85fdf84bd62ae30a74cc8202908060020a820491505090505b600063200000008416600f0b1315613124576080700100000000162e42fefb2fed257559bdaa8202908060020a820491505090505b600063100000008416600f0b13156131595760807001000000000b17217f7d5a7716bba4a9ae8202908060020a820491505090505b600063080000008416600f0b131561318e576080700100000000058b90bfbe9ddbac5e109cce8202908060020a820491505090505b600063040000008416600f0b13156131c357608070010000000002c5c85fdf4b15de6f17eb0d8202908060020a820491505090505b600063020000008416600f0b13156131f85760807001000000000162e42fefa494f1478fde058202908060020a820491505090505b600063010000008416600f0b131561322d57608070010000000000b17217f7d20cf927c8e94c8202908060020a820491505090505b6000628000008416600f0b13156132615760807001000000000058b90bfbe8f71cb4e4b33d8202908060020a820491505090505b6000624000008416600f0b1315613295576080700100000000002c5c85fdf477b662b269458202908060020a820491505090505b6000622000008416600f0b13156132c957608070010000000000162e42fefa3ae53369388c8202908060020a820491505090505b6000621000008416600f0b13156132fd576080700100000000000b17217f7d1d351a389d408202908060020a820491505090505b6000620800008416600f0b131561333157608070010000000000058b90bfbe8e8b2d3d4ede8202908060020a820491505090505b6000620400008416600f0b13156133655760807001000000000002c5c85fdf4741bea6e77e8202908060020a820491505090505b6000620200008416600f0b1315613399576080700100000000000162e42fefa39fe95583c28202908060020a820491505090505b6000620100008416600f0b13156133cd5760807001000000000000b17217f7d1cfb72b45e18202908060020a820491505090505b60006180008416600f0b1315613400576080700100000000000058b90bfbe8e7cc35c3f08202908060020a820491505090505b60006140008416600f0b131561343357608070010000000000002c5c85fdf473e242ea388202908060020a820491505090505b60006120008416600f0b13156134665760807001000000000000162e42fefa39f02b772c8202908060020a820491505090505b60006110008416600f0b131561349957608070010000000000000b17217f7d1cf7d83c1a8202908060020a820491505090505b60006108008416600f0b13156134cc5760807001000000000000058b90bfbe8e7bdcbe2e8202908060020a820491505090505b60006104008416600f0b13156134ff576080700100000000000002c5c85fdf473dea871f8202908060020a820491505090505b60006102008416600f0b131561353257608070010000000000000162e42fefa39ef44d918202908060020a820491505090505b60006101008416600f0b1315613565576080700100000000000000b17217f7d1cf79e9498202908060020a820491505090505b600060808416600f0b131561359757608070010000000000000058b90bfbe8e7bce5448202908060020a820491505090505b600060408416600f0b13156135c95760807001000000000000002c5c85fdf473de6eca8202908060020a820491505090505b600060208416600f0b13156135fb576080700100000000000000162e42fefa39ef366f8202908060020a820491505090505b600060108416600f0b131561362d5760807001000000000000000b17217f7d1cf79afa8202908060020a820491505090505b600060088416600f0b131561365f576080700100000000000000058b90bfbe8e7bcd6d8202908060020a820491505090505b600060048416600f0b131561369157608070010000000000000002c5c85fdf473de6b28202908060020a820491505090505b600060028416600f0b13156136c35760807001000000000000000162e42fefa39ef3588202908060020a820491505090505b600060018416600f0b13156136f557608070010000000000000000b17217f7d1cf79ab8202908060020a820491505090505b604083600f0b9060008212600003808260020a828518041892505050603f03600f0b81908060020a820491505090506f7fffffffffffffffffffffffffffffff600f0b81111561374457600080fd5b809150505b919050565b6040518060600160405280600063ffffffff168152602001600068ffffffffffffffffff168152602001600064ffffffffff1681525090565b6000604051905090565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6137cb81613796565b81146137d657600080fd5b50565b6000813590506137e8816137c2565b92915050565b60006020828403121561380457613803613791565b5b6000613812848285016137d9565b91505092915050565b60008115159050919050565b6138308161381b565b82525050565b600060208201905061384b6000830184613827565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561388b578082015181840152602081019050613870565b60008484015250505050565b6000601f19601f8301169050919050565b60006138b382613851565b6138bd818561385c565b93506138cd81856020860161386d565b6138d681613897565b840191505092915050565b600060208201905081810360008301526138fb81846138a8565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061392e82613903565b9050919050565b61393e81613923565b811461394957600080fd5b50565b60008135905061395b81613935565b92915050565b6000819050919050565b61397481613961565b811461397f57600080fd5b50565b6000813590506139918161396b565b92915050565b600080604083850312156139ae576139ad613791565b5b60006139bc8582860161394c565b92505060206139cd85828601613982565b9150509250929050565b600081600f0b9050919050565b6139ed816139d7565b82525050565b6000602082019050613a0860008301846139e4565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613a4b82613897565b810181811067ffffffffffffffff82111715613a6a57613a69613a13565b5b80604052505050565b6000613a7d613787565b9050613a898282613a42565b919050565b600063ffffffff82169050919050565b613aa781613a8e565b8114613ab257600080fd5b50565b600081359050613ac481613a9e565b92915050565b600068ffffffffffffffffff82169050919050565b613ae881613aca565b8114613af357600080fd5b50565b600081359050613b0581613adf565b92915050565b600064ffffffffff82169050919050565b613b2581613b0b565b8114613b3057600080fd5b50565b600081359050613b4281613b1c565b92915050565b600060608284031215613b5e57613b5d613a0e565b5b613b686060613a73565b90506000613b7884828501613ab5565b6000830152506020613b8c84828501613af6565b6020830152506040613ba084828501613b33565b60408301525092915050565b600060608284031215613bc257613bc1613791565b5b6000613bd084828501613b48565b91505092915050565b613be281613961565b82525050565b6000602082019050613bfd6000830184613bd9565b92915050565b600080600060608486031215613c1c57613c1b613791565b5b6000613c2a8682870161394c565b9350506020613c3b8682870161394c565b9250506040613c4c86828701613982565b9150509250925092565b600060208284031215613c6c57613c6b613791565b5b6000613c7a8482850161394c565b91505092915050565b60008060408385031215613c9a57613c99613791565b5b6000613ca885828601613982565b9250506020613cb985828601613982565b9150509250929050565b600060208284031215613cd957613cd8613791565b5b6000613ce784828501613982565b91505092915050565b613cf981613a8e565b82525050565b613d0881613aca565b82525050565b613d1781613b0b565b82525050565b6000606082019050613d326000830186613cf0565b613d3f6020830185613cff565b613d4c6040830184613d0e565b949350505050565b613d5d81613923565b82525050565b6000602082019050613d786000830184613d54565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b613da381613d7e565b82525050565b6000602082019050613dbe6000830184613d9a565b92915050565b60008060008060808587031215613dde57613ddd613791565b5b6000613dec87828801613982565b9450506020613dfd87828801613982565b9350506040613e0e87828801613982565b9250506060613e1f87828801613982565b91505092959194509250565b613e3481613a8e565b82525050565b613e4381613aca565b82525050565b613e5281613b0b565b82525050565b606082016000820151613e6e6000850182613e2b565b506020820151613e816020850182613e3a565b506040820151613e946040850182613e49565b50505050565b6000606082019050613eaf6000830184613e58565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680613efc57607f821691505b602082108103613f0f57613f0e613eb5565b5b50919050565b7f5a45524f5f464952535400000000000000000000000000000000000000000000600082015250565b6000613f4b600a8361385c565b9150613f5682613f15565b602082019050919050565b60006020820190508181036000830152613f7a81613f3e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613fbb82613961565b9150613fc683613961565b9250828203905081811115613fde57613fdd613f81565b5b92915050565b6000613fef82613961565b9150613ffa83613961565b925082820190508082111561401257614011613f81565b5b92915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b600061404e600a8361385c565b915061405982614018565b602082019050919050565b6000602082019050818103600083015261407d81614041565b9050919050565b600061408f82613961565b915061409a83613961565b92508282026140a881613961565b915082820484148315176140bf576140be613f81565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061410082613961565b915061410b83613961565b92508261411b5761411a6140c6565b5b828204905092915050565b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b600061415c600d8361385c565b915061416782614126565b602082019050919050565b6000602082019050818103600083015261418b8161414f565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea2646970667358221220f8be9800a1ef4a4f2ad33ef73ea179ef5a5d6b997ee73427bdf03aa8ae0861e364736f6c63430008110033 \ No newline at end of file +60c06040523480156200001157600080fd5b506040516200578238038062005782833981810160405281019062000037919062000909565b6801000000000000000083600f0b126200005057600080fd5b6200005a6200061e565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600e6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550866006908162000126919062000c2a565b50856007908162000138919062000c2a565b508460ff166008819055504260038190555060035460808181525050603c8362000163919062000d40565b60a081815250506200018a60016200034f6401000000000262002564176401000000009004565b600260006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550620001e48462000376640100000000026200258a176401000000009004565b600d60006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff1602179055506200024e6000600260009054906101000a9004600f0b60006001620003ca640100000000026401000000009004565b90506000819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550505081601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000d8b565b6000677fffffffffffffff8211156200036757600080fd5b6040829060020a029050919050565b60008082600f0b136200038857600080fd5b60806fb17217f7d1cf79abc9e3b39803f2f6af620003b5846200044e640100000000026401000000009004565b600f0b02908060020a82049150509050919050565b620003d46200061e565b620003de6200061e565b82816000019063ffffffff16908163ffffffff168152505083816020019068ffffffffffffffffff16908168ffffffffffffffffff168152505067ffffffffffffffff8516816040019067ffffffffffffffff16908167ffffffffffffffff168152505080915050949350505050565b60008082600f0b136200046057600080fd5b60008083600f0b90506801000000000000000081126200049c576040819060008212600003808260020a82851804189250505090506040820191505b6401000000008112620004cb576020819060008212600003808260020a82851804189250505090506020820191505b620100008112620004f8576010819060008212600003808260020a82851804189250505090506010820191505b610100811262000524576008819060008212600003808260020a82851804189250505090506008820191505b601081126200054f576004819060008212600003808260020a82851804189250505090506004820191505b600481126200057a576002819060008212600003808260020a82851804189250505090506002820191505b600281126200058a576001820191505b600060408084039060020a029050600083607f0386600f0b9060020a029050600067800000000000000090505b600081131562000611578182029150600060ff83908060020a8204915050905080607f0183908060020a8204915050925080820284019350506001819060008212600003808260020a8285180418925050509050620005b7565b5081945050505050919050565b6040518060600160405280600063ffffffff168152602001600068ffffffffffffffffff168152602001600067ffffffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620006c38262000678565b810181811067ffffffffffffffff82111715620006e557620006e462000689565b5b80604052505050565b6000620006fa6200065a565b9050620007088282620006b8565b919050565b600067ffffffffffffffff8211156200072b576200072a62000689565b5b620007368262000678565b9050602081019050919050565b60005b838110156200076357808201518184015260208101905062000746565b60008484015250505050565b60006200078662000780846200070d565b620006ee565b905082815260208101848484011115620007a557620007a462000673565b5b620007b284828562000743565b509392505050565b600082601f830112620007d257620007d16200066e565b5b8151620007e48482602086016200076f565b91505092915050565b600060ff82169050919050565b6200080581620007ed565b81146200081157600080fd5b50565b6000815190506200082581620007fa565b92915050565b600081600f0b9050919050565b62000843816200082b565b81146200084f57600080fd5b50565b600081519050620008638162000838565b92915050565b6000819050919050565b6200087e8162000869565b81146200088a57600080fd5b50565b6000815190506200089e8162000873565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620008d182620008a4565b9050919050565b620008e381620008c4565b8114620008ef57600080fd5b50565b6000815190506200090381620008d8565b92915050565b60008060008060008060c0878903121562000929576200092862000664565b5b600087015167ffffffffffffffff8111156200094a576200094962000669565b5b6200095889828a01620007ba565b965050602087015167ffffffffffffffff8111156200097c576200097b62000669565b5b6200098a89828a01620007ba565b95505060406200099d89828a0162000814565b9450506060620009b089828a0162000852565b9350506080620009c389828a016200088d565b92505060a0620009d689828a01620008f2565b9150509295509295509295565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062000a3657607f821691505b60208210810362000a4c5762000a4b620009ee565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b60006008830262000ab97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000a77565b62000ac5868362000a77565b95508019841693508086168417925050509392505050565b6000819050919050565b600062000b0862000b0262000afc8462000869565b62000add565b62000869565b9050919050565b6000819050919050565b62000b248362000ae7565b62000b3c62000b338262000b0f565b84845462000a87565b825550505050565b600090565b62000b5362000b44565b62000b6081848462000b19565b505050565b5b8181101562000b885762000b7c60008262000b49565b60018101905062000b66565b5050565b601f82111562000bd75762000ba18162000a52565b62000bac8462000a67565b8101602085101562000bbc578190505b62000bd462000bcb8562000a67565b83018262000b65565b50505b505050565b60008160020a8304905092915050565b600062000bff6000198460080262000bdc565b1980831691505092915050565b600062000c1a838362000bec565b9150826002028217905092915050565b62000c3582620009e3565b67ffffffffffffffff81111562000c515762000c5062000689565b5b62000c5d825462000a1d565b62000c6a82828562000b8c565b600060209050601f83116001811462000ca2576000841562000c8d578287015190505b62000c99858262000c0c565b86555062000d09565b601f19841662000cb28662000a52565b60005b8281101562000cdc5784890151825560018201915060208501945060208101905062000cb5565b8683101562000cfc578489015162000cf8601f89168262000bec565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000d4d8262000869565b915062000d5a8362000869565b925082820262000d6a8162000869565b9150828204841483151762000d845762000d8362000d11565b5b5092915050565b60805160a0516149ae62000dd46000396000818161173d01528181611c9c0152818161221a015261243a0152600081816117690152818161245b01526124a001526149ae6000f3fe608060405234801561001057600080fd5b50600436106102bd576000357c0100000000000000000000000000000000000000000000000000000000900480636a2d094e11610184578063983b2d56116100eb578063d89135cd116100a4578063d89135cd1461094a578063e54063a614610968578063e69571af14610998578063e8095295146109c8578063eda4e6d6146109e6578063f2fde38b14610a04576102bd565b8063983b2d561461084e578063a457c2d71461087e578063a9059cbb146108ae578063b470aade146108de578063c0ab7077146108fc578063d340ef8a1461092c576102bd565b806379ba50971161013d57806379ba50971461079c57806384dde4af146107ba5780638da5cb5b146107d85780638f0b2d5d146107f65780638f1df6bc1461081257806395d89b4114610830576102bd565b80636a2d094e146106b257806370a08231146106e2578063731f237c1461071257806373f42561146107305780637445e33a1461074e57806374bedb951461077e576102bd565b80633092afd511610228578063449a52f8116101e1578063449a52f8146105a457806347a50517146105d45780634abfbba21461060457806351b4541c1461063457806358b2833b146106645780636787a9be14610682576102bd565b80633092afd5146104a857806331333487146104d8578063313ce56714610508578063395093511461052657806340452d911461055657806342966c6814610588576102bd565b80631989c6a81161027a5780631989c6a8146103ac578063213d1e1e146103ca578063229ba197146103fa57806323a859441461041857806323b872dd146104485780632a7aec0914610478576102bd565b806301ffc9a7146102c257806306fdde03146102f2578063095ea7b31461031057806309f28f3c1461034057806311c566151461035e57806318160ddd1461038e575b600080fd5b6102dc60048036038101906102d79190613e75565b610a34565b6040516102e99190613ebd565b60405180910390f35b6102fa610bda565b6040516103079190613f68565b60405180910390f35b61032a6004803603810190610325919061401e565b610c68565b6040516103379190613ebd565b60405180910390f35b610348610e39565b604051610355919061407a565b60405180910390f35b610378600480360381019061037391906140c1565b610e4c565b6040516103859190614110565b60405180910390f35b610396610e7f565b6040516103a39190614110565b60405180910390f35b6103b4610e96565b6040516103c19190614110565b60405180910390f35b6103e460048036038101906103df91906142cc565b610ea2565b6040516103f19190614110565b60405180910390f35b610402610ebb565b60405161040f919061407a565b60405180910390f35b610432600480360381019061042d91906142cc565b610ece565b60405161043f9190613ebd565b60405180910390f35b610462600480360381019061045d91906142f9565b610f36565b60405161046f9190613ebd565b60405180910390f35b610492600480360381019061048d91906142cc565b6110e9565b60405161049f919061407a565b60405180910390f35b6104c260048036038101906104bd919061434c565b611121565b6040516104cf9190613ebd565b60405180910390f35b6104f260048036038101906104ed9190614379565b611214565b6040516104ff9190614110565b60405180910390f35b610510611280565b60405161051d9190614110565b60405180910390f35b610540600480360381019061053b919061401e565b611286565b60405161054d9190613ebd565b60405180910390f35b610570600480360381019061056b91906143b9565b61141c565b60405161057f93929190614413565b60405180910390f35b6105a2600480360381019061059d91906143b9565b61148b565b005b6105be60048036038101906105b9919061401e565b6115b0565b6040516105cb9190613ebd565b60405180910390f35b6105ee60048036038101906105e9919061434c565b6116f0565b6040516105fb9190614110565b60405180910390f35b61061e600480360381019061061991906143b9565b611739565b60405161062b9190614110565b60405180910390f35b61064e600480360381019061064991906143b9565b611799565b60405161065b9190614110565b60405180910390f35b61066c6117ba565b6040516106799190614110565b60405180910390f35b61069c600480360381019061069791906143b9565b6117c0565b6040516106a99190614110565b60405180910390f35b6106cc60048036038101906106c791906143b9565b611801565b6040516106d99190614110565b60405180910390f35b6106fc60048036038101906106f7919061434c565b611822565b6040516107099190614110565b60405180910390f35b61071a611889565b6040516107279190614110565b60405180910390f35b61073861189a565b6040516107459190614110565b60405180910390f35b610768600480360381019061076391906142cc565b6118a0565b6040516107759190614110565b60405180910390f35b6107866118ce565b6040516107939190614110565b60405180910390f35b6107a46118d4565b6040516107b19190613ebd565b60405180910390f35b6107c2611a7b565b6040516107cf9190614459565b60405180910390f35b6107e0611aa1565b6040516107ed9190614459565b60405180910390f35b610810600480360381019061080b919061434c565b611ac7565b005b61081a611b65565b6040516108279190613ebd565b60405180910390f35b610838611e18565b6040516108459190613f68565b60405180910390f35b6108686004803603810190610863919061434c565b611ea6565b6040516108759190613ebd565b60405180910390f35b6108986004803603810190610893919061401e565b611f63565b6040516108a59190613ebd565b60405180910390f35b6108c860048036038101906108c3919061401e565b612182565b6040516108d59190613ebd565b60405180910390f35b6108e6612218565b6040516108f39190614110565b60405180910390f35b610916600480360381019061091191906143b9565b61223c565b6040516109239190614110565b60405180910390f35b610934612390565b6040516109419190614110565b60405180910390f35b610952612396565b60405161095f9190614110565b60405180910390f35b610982600480360381019061097d91906142cc565b6123a0565b60405161098f9190614110565b60405180910390f35b6109b260048036038101906109ad9190614474565b6123b4565b6040516109bf919061454a565b60405180910390f35b6109d0612434565b6040516109dd9190614590565b60405180910390f35b6109ee61249e565b6040516109fb9190614110565b60405180910390f35b610a1e6004803603810190610a19919061434c565b6124c2565b604051610a2b9190613ebd565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610a885760019050610bd5565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610ada5760019050610bd5565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610b2c5760019050610bd5565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610b7e5760019050610bd5565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610bd05760019050610bd5565b600090505b919050565b60068054610be7906145da565b80601f0160208091040260200160405190810160405280929190818152602001828054610c13906145da565b8015610c605780601f10610c3557610100808354040283529160200191610c60565b820191906000526020600020905b815481529060010190602001808311610c4357829003601f168201915b505050505081565b6000806000600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115610d345760008314610d33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2a90614657565b60405180910390fd5b5b610d3c611b65565b50610d46836117c0565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610e269190614110565b60405180910390a3600191505092915050565b600260009054906101000a9004600f0b81565b600080610e61610e5b85612564565b846125cc565b9050610e6c8161264b565b67ffffffffffffffff1691505092915050565b6000600c54600954610e9191906146a6565b905090565b60008080549050905090565b6000816020015168ffffffffffffffffff169050919050565b600d60009054906101000a9004600f0b81565b600080826000015163ffffffff161115610eeb5760009050610f31565b6000826020015168ffffffffffffffffff161115610f0c5760009050610f31565b6000826040015167ffffffffffffffff161115610f2c5760009050610f31565b600190505b919050565b6000806000610f43611b65565b50610f4d846117c0565b915081600f60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610fd857600080fd5b81600f60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461106491906146a6565b92505081905550611076868684612680565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040516110d59190614110565b60405180910390a380925050509392505050565b60008067ffffffffffffffff836040015160070b169050600081600f0b03611118576111156001612564565b90505b80915050919050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806111aa57503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b6111b357600080fd5b6000600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b60008060008061122386612564565b925061122e85612564565b9150611249600d60009054906101000a9004600f0b836125cc565b9050611254816126a5565b905061126083826125cc565b905061126b8161264b565b67ffffffffffffffff16935050505092915050565b60085481565b600080611291611b65565b5061129b836117c0565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461132991906146da565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040516114099190614110565b60405180910390a3600191505092915050565b6000818154811061142c57600080fd5b906000526020600020016000915090508060000160009054906101000a900463ffffffff16908060000160049054906101000a900468ffffffffffffffffff169080600001600d9054906101000a900467ffffffffffffffff16905083565b600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166114e157600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481111561152d57600080fd5b6000611538826117c0565b90506115443382612732565b5081600c600082825461155791906146da565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040516115a49190614110565b60405180910390a25050565b600080600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661163f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116369061475a565b60405180910390fd5b611647611b65565b50611651836117c0565b9050826009600082825461166591906146da565b925050819055506116768482612839565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516116d49190614110565b60405180910390a36116e46128fd565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f000000000000000000000000000000000000000000000000000000000000000082611767919061477a565b7f000000000000000000000000000000000000000000000000000000000000000061179291906146da565b9050919050565b6000603c82426117a991906146a6565b6117b391906147eb565b9050919050565b60035481565b6000806117e46117cf84612564565b600260009054906101000a9004600f0b612ac1565b90506117ef8161264b565b67ffffffffffffffff16915050919050565b6000603c824261181191906146a6565b61181b91906147eb565b9050919050565b600080600080611839611834866116f0565b612564565b9250611846600354611799565b905061186183600260009054906101000a9004600f0b6125cc565b915061187f61186f8361264b565b67ffffffffffffffff1682611214565b9350505050919050565b6000611895600061223c565b905090565b600c5481565b60008060006118ae84610ea2565b91506118b9846110e9565b90506118c58282610e4c565b92505050919050565b600b5481565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461193157600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b2157600080fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000611b6f613dd2565b611b77613dd2565b611b7f613dd2565b6000806000806000611b8f611889565b50611b98612b4d565b9750611ba388610ece565b15611bb957600098505050505050505050611e15565b6000600a5481548110611bcf57611bce61481c565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250509550611c7c886123a0565b9450600185611c8b91906146da565b9050611c96866110e9565b9350603c7f0000000000000000000000000000000000000000000000000000000000000000611cc591906147eb565b9150611ce8600d60009054906101000a9004600f0b611ce384612564565b6125cc565b9250611cf3836126a5565b84611cfe919061484b565b9250611d14600084611d0e610e7f565b846123b4565b96506000879080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505050611dd087612ce3565b507f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d67581604051611e009190614110565b60405180910390a16001985050505050505050505b90565b60078054611e25906145da565b80601f0160208091040260200160405190810160405280929190818152602001828054611e51906145da565b8015611e9e5780601f10611e7357610100808354040283529160200191611e9e565b820191906000526020600020905b815481529060010190602001808311611e8157829003601f168201915b505050505081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f0257600080fd5b6001600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600080611f6f836117c0565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015611ffa57600080fd5b612002611b65565b5080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461208f91906146a6565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460405161216f9190614110565b60405180910390a3600191505092915050565b600080600061218f611b65565b50612199846117c0565b91506121a6338684612680565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040516122059190614110565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080600080600061224f600354611799565b92506000830361226657600094505050505061238b565b600260009054906101000a9004600f0b905060008611801561228757508286105b15612290578592505b61229983612564565b91506122b4600d60009054906101000a9004600f0b836125cc565b93506122bf846126a5565b93506122da600260009054906101000a9004600f0b856125cc565b600260006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550603c83612322919061477a565b60035461232f91906146da565b60038190555080600f0b836003547f1c9c74563c32efd114cb36fb5e432d9386c8254d08456614804a33a3088ab736600260009054906101000a9004600f0b60405161237b919061407a565b60405180910390a4829450505050505b919050565b600a5481565b6000600c54905090565b6000816000015163ffffffff169050919050565b6123bc613dd2565b6123c4613dd2565b82816000019063ffffffff16908163ffffffff168152505083816020019068ffffffffffffffffff16908168ffffffffffffffffff168152505067ffffffffffffffff8516816040019067ffffffffffffffff16908167ffffffffffffffff168152505080915050949350505050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000004261248591906146a6565b61248f91906147eb565b61249991906146da565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461251e57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000677fffffffffffffff82111561257b57600080fd5b6040829060020a029050919050565b60008082600f0b1361259b57600080fd5b60806fb17217f7d1cf79abc9e3b39803f2f6af6125b784612df0565b600f0b02908060020a82049150509050919050565b600080604083600f0b85600f0b029060008212600003808260020a82851804189250505090507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b811215801561263857506f7fffffffffffffffffffffffffffffff600f0b8113155b61264157600080fd5b8091505092915050565b60008082600f0b121561265d57600080fd5b604082600f0b9060008212600003808260020a8285180418925050509050919050565b60008061268d8584612732565b506126988484612839565b5060019150509392505050565b60006840000000000000000082600f0b126126bf57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b12156126f3576000905061272d565b61272a6080700171547652b82fe1777d0ffda0d23a7d1284600f0b029060008212600003808260020a828518041892505050612fb6565b90505b919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000850361278e5760009350505050612833565b612797866116f0565b9250848310156127dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d3906148ff565b60405180910390fd5b84836127e891906146a6565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000850361289557600093505050506128f7565b61289e866116f0565b925084836128ac91906146da565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000612907613dd2565b6000612911610e7f565b90506000600160008054905061292791906146a6565b815481106129385761293761481c565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681525050915080826020019068ffffffffffffffffff16908168ffffffffffffffffff16815250508160006001600080549050612a1391906146a6565b81548110612a2457612a2361481c565b5b9060005260206000200160008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555090505060019250505090565b60008082600f0b03612ad257600080fd5b600082600f0b604085600f0b9060020a0281612af157612af06147bc565b5b0590507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b8112158015612b3a57506f7fffffffffffffffffffffffffffffff600f0b8113155b612b4357600080fd5b8091505092915050565b612b55613dd2565b612b5d613dd2565b612b65613dd2565b600080600a5481548110612b7c57612b7b61481c565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152505092503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381865afa158015612c87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cab919061494b565b6fffffffffffffffffffffffffffffffff169050612cc8836123a0565b8111612cd957819350505050612ce0565b8293505050505b90565b6000806000612cf1846118a0565b9150600b54612cff836117c0565b612d0991906146a6565b9050612d37601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682612839565b50836000015163ffffffff16601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f9a2a887706623ad3ff7fc85652deeceabe9fe1e00466c597972079ee91ea40d384604051612dab9190614110565b60405180910390a36001600a6000828254612dc691906146da565b9250508190555080600b6000828254612ddf91906146da565b925050819055508192505050919050565b60008082600f0b13612e0157600080fd5b60008083600f0b9050680100000000000000008112612e3c576040819060008212600003808260020a82851804189250505090506040820191505b6401000000008112612e6a576020819060008212600003808260020a82851804189250505090506020820191505b620100008112612e96576010819060008212600003808260020a82851804189250505090506010820191505b6101008112612ec1576008819060008212600003808260020a82851804189250505090506008820191505b60108112612eeb576004819060008212600003808260020a82851804189250505090506004820191505b60048112612f15576002819060008212600003808260020a82851804189250505090506002820191505b60028112612f24576001820191505b600060408084039060020a029050600083607f0386600f0b9060020a029050600067800000000000000090505b6000811315612fa9578182029150600060ff83908060020a8204915050905080607f0183908060020a8204915050925080820284019350506001819060008212600003808260020a8285180418925050509050612f51565b5081945050505050919050565b60006840000000000000000082600f0b12612fd057600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b12156130045760009050613dcd565b60006f80000000000000000000000000000000905060006780000000000000008416600f0b131561305257608070016a09e667f3bcc908b2fb1366ea957d3e8202908060020a820491505090505b60006740000000000000008416600f0b131561308b5760807001306fe0a31b7152de8d5a46305c85edec8202908060020a820491505090505b60006720000000000000008416600f0b13156130c45760807001172b83c7d517adcdf7c8c50eb14a791f8202908060020a820491505090505b60006710000000000000008416600f0b13156130fd57608070010b5586cf9890f6298b92b71842a983638202908060020a820491505090505b60006708000000000000008416600f0b13156131365760807001059b0d31585743ae7c548eb68ca417fd8202908060020a820491505090505b60006704000000000000008416600f0b131561316f576080700102c9a3e778060ee6f7caca4f7a29bde88202908060020a820491505090505b60006702000000000000008416600f0b13156131a857608070010163da9fb33356d84a66ae336dcdfa3f8202908060020a820491505090505b60006701000000000000008416600f0b13156131e1576080700100b1afa5abcbed6129ab13ec11dc95438202908060020a820491505090505b600066800000000000008416600f0b131561321957608070010058c86da1c09ea1ff19d294cf2f679b8202908060020a820491505090505b600066400000000000008416600f0b13156132515760807001002c605e2e8cec506d21bfc89a23a00f8202908060020a820491505090505b600066200000000000008416600f0b1315613289576080700100162f3904051fa128bca9c55c31e5df8202908060020a820491505090505b600066100000000000008416600f0b13156132c15760807001000b175effdc76ba38e31671ca9397258202908060020a820491505090505b600066080000000000008416600f0b13156132f9576080700100058ba01fb9f96d6cacd4b180917c3d8202908060020a820491505090505b600066040000000000008416600f0b131561333157608070010002c5cc37da9491d0985c348c68e7b38202908060020a820491505090505b600066020000000000008416600f0b13156133695760807001000162e525ee054754457d59952920268202908060020a820491505090505b600066010000000000008416600f0b13156133a157608070010000b17255775c040618bf4a4ade83fc8202908060020a820491505090505b6000658000000000008416600f0b13156133d85760807001000058b91b5bc9ae2eed81e9b7d4cfab8202908060020a820491505090505b6000654000000000008416600f0b131561340f576080700100002c5c89d5ec6ca4d7c8acc017b7c98202908060020a820491505090505b6000652000000000008416600f0b131561344657608070010000162e43f4f831060e02d839a9d16d8202908060020a820491505090505b6000651000000000008416600f0b131561347d576080700100000b1721bcfc99d9f890ea069117638202908060020a820491505090505b6000650800000000008416600f0b13156134b457608070010000058b90cf1e6d97f9ca14dbcc16288202908060020a820491505090505b6000650400000000008416600f0b13156134eb5760807001000002c5c863b73f016468f6bac5ca2b8202908060020a820491505090505b6000650200000000008416600f0b1315613522576080700100000162e430e5a18f6119e3c02282a58202908060020a820491505090505b6000650100000000008416600f0b13156135595760807001000000b1721835514b86e6d96efd1bfe8202908060020a820491505090505b60006480000000008416600f0b131561358f576080700100000058b90c0b48c6be5df846c5b2ef8202908060020a820491505090505b60006440000000008416600f0b13156135c557608070010000002c5c8601cc6b9e94213c72737a8202908060020a820491505090505b60006420000000008416600f0b13156135fb5760807001000000162e42fff037df38aa2b219f068202908060020a820491505090505b60006410000000008416600f0b131561363157608070010000000b17217fba9c739aa5819f44f98202908060020a820491505090505b60006408000000008416600f0b13156136675760807001000000058b90bfcdee5acd3c1cedc8238202908060020a820491505090505b60006404000000008416600f0b131561369d576080700100000002c5c85fe31f35a6a30da1be508202908060020a820491505090505b60006402000000008416600f0b13156136d357608070010000000162e42ff0999ce3541b9fffcf8202908060020a820491505090505b60006401000000008416600f0b1315613709576080700100000000b17217f80f4ef5aadda455548202908060020a820491505090505b600063800000008416600f0b131561373e57608070010000000058b90bfbf8479bd5a81b51ad8202908060020a820491505090505b600063400000008416600f0b13156137735760807001000000002c5c85fdf84bd62ae30a74cc8202908060020a820491505090505b600063200000008416600f0b13156137a8576080700100000000162e42fefb2fed257559bdaa8202908060020a820491505090505b600063100000008416600f0b13156137dd5760807001000000000b17217f7d5a7716bba4a9ae8202908060020a820491505090505b600063080000008416600f0b1315613812576080700100000000058b90bfbe9ddbac5e109cce8202908060020a820491505090505b600063040000008416600f0b131561384757608070010000000002c5c85fdf4b15de6f17eb0d8202908060020a820491505090505b600063020000008416600f0b131561387c5760807001000000000162e42fefa494f1478fde058202908060020a820491505090505b600063010000008416600f0b13156138b157608070010000000000b17217f7d20cf927c8e94c8202908060020a820491505090505b6000628000008416600f0b13156138e55760807001000000000058b90bfbe8f71cb4e4b33d8202908060020a820491505090505b6000624000008416600f0b1315613919576080700100000000002c5c85fdf477b662b269458202908060020a820491505090505b6000622000008416600f0b131561394d57608070010000000000162e42fefa3ae53369388c8202908060020a820491505090505b6000621000008416600f0b1315613981576080700100000000000b17217f7d1d351a389d408202908060020a820491505090505b6000620800008416600f0b13156139b557608070010000000000058b90bfbe8e8b2d3d4ede8202908060020a820491505090505b6000620400008416600f0b13156139e95760807001000000000002c5c85fdf4741bea6e77e8202908060020a820491505090505b6000620200008416600f0b1315613a1d576080700100000000000162e42fefa39fe95583c28202908060020a820491505090505b6000620100008416600f0b1315613a515760807001000000000000b17217f7d1cfb72b45e18202908060020a820491505090505b60006180008416600f0b1315613a84576080700100000000000058b90bfbe8e7cc35c3f08202908060020a820491505090505b60006140008416600f0b1315613ab757608070010000000000002c5c85fdf473e242ea388202908060020a820491505090505b60006120008416600f0b1315613aea5760807001000000000000162e42fefa39f02b772c8202908060020a820491505090505b60006110008416600f0b1315613b1d57608070010000000000000b17217f7d1cf7d83c1a8202908060020a820491505090505b60006108008416600f0b1315613b505760807001000000000000058b90bfbe8e7bdcbe2e8202908060020a820491505090505b60006104008416600f0b1315613b83576080700100000000000002c5c85fdf473dea871f8202908060020a820491505090505b60006102008416600f0b1315613bb657608070010000000000000162e42fefa39ef44d918202908060020a820491505090505b60006101008416600f0b1315613be9576080700100000000000000b17217f7d1cf79e9498202908060020a820491505090505b600060808416600f0b1315613c1b57608070010000000000000058b90bfbe8e7bce5448202908060020a820491505090505b600060408416600f0b1315613c4d5760807001000000000000002c5c85fdf473de6eca8202908060020a820491505090505b600060208416600f0b1315613c7f576080700100000000000000162e42fefa39ef366f8202908060020a820491505090505b600060108416600f0b1315613cb15760807001000000000000000b17217f7d1cf79afa8202908060020a820491505090505b600060088416600f0b1315613ce3576080700100000000000000058b90bfbe8e7bcd6d8202908060020a820491505090505b600060048416600f0b1315613d1557608070010000000000000002c5c85fdf473de6b28202908060020a820491505090505b600060028416600f0b1315613d475760807001000000000000000162e42fefa39ef3588202908060020a820491505090505b600060018416600f0b1315613d7957608070010000000000000000b17217f7d1cf79ab8202908060020a820491505090505b604083600f0b9060008212600003808260020a828518041892505050603f03600f0b81908060020a820491505090506f7fffffffffffffffffffffffffffffff600f0b811115613dc857600080fd5b809150505b919050565b6040518060600160405280600063ffffffff168152602001600068ffffffffffffffffff168152602001600067ffffffffffffffff1681525090565b6000604051905090565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613e5281613e1d565b8114613e5d57600080fd5b50565b600081359050613e6f81613e49565b92915050565b600060208284031215613e8b57613e8a613e18565b5b6000613e9984828501613e60565b91505092915050565b60008115159050919050565b613eb781613ea2565b82525050565b6000602082019050613ed26000830184613eae565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613f12578082015181840152602081019050613ef7565b60008484015250505050565b6000601f19601f8301169050919050565b6000613f3a82613ed8565b613f448185613ee3565b9350613f54818560208601613ef4565b613f5d81613f1e565b840191505092915050565b60006020820190508181036000830152613f828184613f2f565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613fb582613f8a565b9050919050565b613fc581613faa565b8114613fd057600080fd5b50565b600081359050613fe281613fbc565b92915050565b6000819050919050565b613ffb81613fe8565b811461400657600080fd5b50565b60008135905061401881613ff2565b92915050565b6000806040838503121561403557614034613e18565b5b600061404385828601613fd3565b925050602061405485828601614009565b9150509250929050565b600081600f0b9050919050565b6140748161405e565b82525050565b600060208201905061408f600083018461406b565b92915050565b61409e8161405e565b81146140a957600080fd5b50565b6000813590506140bb81614095565b92915050565b600080604083850312156140d8576140d7613e18565b5b60006140e685828601614009565b92505060206140f7858286016140ac565b9150509250929050565b61410a81613fe8565b82525050565b60006020820190506141256000830184614101565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61416882613f1e565b810181811067ffffffffffffffff8211171561418757614186614130565b5b80604052505050565b600061419a613e0e565b90506141a6828261415f565b919050565b600063ffffffff82169050919050565b6141c4816141ab565b81146141cf57600080fd5b50565b6000813590506141e1816141bb565b92915050565b600068ffffffffffffffffff82169050919050565b614205816141e7565b811461421057600080fd5b50565b600081359050614222816141fc565b92915050565b600067ffffffffffffffff82169050919050565b61424581614228565b811461425057600080fd5b50565b6000813590506142628161423c565b92915050565b60006060828403121561427e5761427d61412b565b5b6142886060614190565b90506000614298848285016141d2565b60008301525060206142ac84828501614213565b60208301525060406142c084828501614253565b60408301525092915050565b6000606082840312156142e2576142e1613e18565b5b60006142f084828501614268565b91505092915050565b60008060006060848603121561431257614311613e18565b5b600061432086828701613fd3565b935050602061433186828701613fd3565b925050604061434286828701614009565b9150509250925092565b60006020828403121561436257614361613e18565b5b600061437084828501613fd3565b91505092915050565b600080604083850312156143905761438f613e18565b5b600061439e85828601614009565b92505060206143af85828601614009565b9150509250929050565b6000602082840312156143cf576143ce613e18565b5b60006143dd84828501614009565b91505092915050565b6143ef816141ab565b82525050565b6143fe816141e7565b82525050565b61440d81614228565b82525050565b600060608201905061442860008301866143e6565b61443560208301856143f5565b6144426040830184614404565b949350505050565b61445381613faa565b82525050565b600060208201905061446e600083018461444a565b92915050565b6000806000806080858703121561448e5761448d613e18565b5b600061449c87828801614009565b94505060206144ad878288016140ac565b93505060406144be87828801614009565b92505060606144cf87828801614009565b91505092959194509250565b6144e4816141ab565b82525050565b6144f3816141e7565b82525050565b61450281614228565b82525050565b60608201600082015161451e60008501826144db565b50602082015161453160208501826144ea565b50604082015161454460408501826144f9565b50505050565b600060608201905061455f6000830184614508565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61458a81614565565b82525050565b60006020820190506145a56000830184614581565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806145f257607f821691505b602082108103614605576146046145ab565b5b50919050565b7f5a45524f5f464952535400000000000000000000000000000000000000000000600082015250565b6000614641600a83613ee3565b915061464c8261460b565b602082019050919050565b6000602082019050818103600083015261467081614634565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006146b182613fe8565b91506146bc83613fe8565b92508282039050818111156146d4576146d3614677565b5b92915050565b60006146e582613fe8565b91506146f083613fe8565b925082820190508082111561470857614707614677565b5b92915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b6000614744600a83613ee3565b915061474f8261470e565b602082019050919050565b6000602082019050818103600083015261477381614737565b9050919050565b600061478582613fe8565b915061479083613fe8565b925082820261479e81613fe8565b915082820484148315176147b5576147b4614677565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006147f682613fe8565b915061480183613fe8565b925082614811576148106147bc565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006148568261405e565b91506148618361405e565b925082820390506f7fffffffffffffffffffffffffffffff81137fffffffffffffffffffffffffffffffff80000000000000000000000000000000821217156148ad576148ac614677565b5b92915050565b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b60006148e9600d83613ee3565b91506148f4826148b3565b602082019050919050565b60006020820190508181036000830152614918816148dc565b9050919050565b61492881614565565b811461493357600080fd5b50565b6000815190506149458161491f565b92915050565b60006020828403121561496157614960613e18565b5b600061496f84828501614936565b9150509291505056fea2646970667358221220a9e3443175ce41be43aa23b47125e748c6e2ef68ed49a2c95e7a6fd161f9c0b164736f6c63430008110033 \ No newline at end of file diff --git a/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.json b/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.json index 927d32d..34749c9 100644 --- a/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.json +++ b/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.json @@ -1 +1 @@ -[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"int128","name":"_taxLevel","type":"int128"},{"internalType":"uint256","name":"_periodMinutes","type":"uint256"},{"internalType":"address","name":"_defaultSinkAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_burner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"_foo","type":"bytes32"}],"name":"Debug","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_period","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_periodCount","type":"uint256"},{"indexed":true,"internalType":"int128","name":"_oldAmount","type":"int128"},{"indexed":false,"internalType":"int128","name":"_newAmount","type":"int128"}],"name":"Decayed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Mint","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":false,"internalType":"uint256","name":"_period","type":"uint256"}],"name":"Period","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_account","type":"address"},{"indexed":true,"internalType":"uint256","name":"_period","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Redistribution","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"actualPeriod","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"applyDemurrage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rounds","type":"uint256"}],"name":"applyDemurrageLimited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"baseBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"changePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"decayBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"demurrageAmount","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_target","type":"uint256"}],"name":"demurrageCycles","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"demurrageTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lastTimestamp","type":"uint256"}],"name":"getMinutesDelta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_periodCount","type":"uint256"}],"name":"getPeriodTimeDelta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint40","name":"demurrage","type":"uint40"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"isEmptyRedistribution","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"lastPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":"periodDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redistributionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"redistributions","outputs":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint40","name":"demurrage","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sinkAddress","type":"address"}],"name":"setSinkAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sinkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"taxLevel","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"toBaseAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_participants","type":"uint256"},{"internalType":"uint256","name":"_demurrageModifierPpm","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"toRedistribution","outputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint40","name":"demurrage","type":"uint40"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint40","name":"demurrage","type":"uint40"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"toRedistributionDemurrageModifier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint40","name":"demurrage","type":"uint40"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"toRedistributionPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint40","name":"demurrage","type":"uint40"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"toRedistributionSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSink","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] +[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"int128","name":"_taxLevel","type":"int128"},{"internalType":"uint256","name":"_periodMinutes","type":"uint256"},{"internalType":"address","name":"_defaultSinkAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_burner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int128","name":"_foo","type":"int128"},{"indexed":true,"internalType":"uint256","name":"_bar","type":"uint256"}],"name":"Debug","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_period","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_periodCount","type":"uint256"},{"indexed":true,"internalType":"int128","name":"_oldAmount","type":"int128"},{"indexed":false,"internalType":"int128","name":"_newAmount","type":"int128"}],"name":"Decayed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_minter","type":"address"},{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Mint","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":false,"internalType":"uint256","name":"_period","type":"uint256"}],"name":"Period","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_account","type":"address"},{"indexed":true,"internalType":"uint256","name":"_period","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Redistribution","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"actualPeriod","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"applyDemurrage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rounds","type":"uint256"}],"name":"applyDemurrageLimited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"baseBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"changePeriod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"decayBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"demurrageAmount","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_target","type":"uint256"}],"name":"demurrageCycles","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"demurrageTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"},{"internalType":"int128","name":"_demurrageAmount","type":"int128"}],"name":"getDistribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"getDistributionFromRedistribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lastTimestamp","type":"uint256"}],"name":"getMinutesDelta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_periodCount","type":"uint256"}],"name":"getPeriodTimeDelta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"isEmptyRedistribution","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"lastPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":"periodDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redistributionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"redistributions","outputs":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sinkAddress","type":"address"}],"name":"setSinkAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sinkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"taxLevel","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"toBaseAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_participants","type":"uint256"},{"internalType":"int128","name":"_demurrageModifier","type":"int128"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"toRedistribution","outputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"toRedistributionDemurrageModifier","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"toRedistributionPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"toRedistributionSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSink","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] diff --git a/python/erc20_demurrage_token/token.py b/python/erc20_demurrage_token/token.py index 75e1426..d102a79 100644 --- a/python/erc20_demurrage_token/token.py +++ b/python/erc20_demurrage_token/token.py @@ -29,6 +29,28 @@ from erc20_demurrage_token.fixed import from_fixed logg = logging.getLogger(__name__) +class DemurrageRedistribution: + + def __init__(self, v): + d = ABIContractDecoder() + v = strip_0x(v) + d.typ(ABIContractType.UINT256) + d.typ(ABIContractType.UINT256) + d.typ(ABIContractType.BYTES32) + d.val(v[:64]) + d.val(v[64:128]) + d.val(v[128:192]) + r = d.decode() + + self.period = r[0] + self.value = r[1] + self.demurrage = from_fixed(r[2]) + + + def __str__(self): + return 'period {} value {} demurrage {}'.format(self.period, self.value, self.demurrage) + + class DemurrageTokenSettings: def __init__(self): @@ -315,7 +337,7 @@ class DemurrageToken(ERC20): enc = ABIContractEncoder() enc.method('toRedistributionPeriod') v = strip_0x(redistribution) - enc.typ_literal('(uint32,uint72,uint104)') + enc.typ_literal('(uint32,uint72,uint64)') enc.bytes32(v[:64]) enc.bytes32(v[64:128]) enc.bytes32(v[128:192]) @@ -356,7 +378,7 @@ class DemurrageToken(ERC20): enc = ABIContractEncoder() enc.method('toRedistributionSupply') v = strip_0x(redistribution) - enc.typ_literal('(uint32,uint72,uint104)') + enc.typ_literal('(uint32,uint72,uint64)') enc.bytes32(v[:64]) enc.bytes32(v[64:128]) enc.bytes32(v[128:192]) @@ -376,7 +398,7 @@ class DemurrageToken(ERC20): enc = ABIContractEncoder() enc.method('toRedistributionDemurrageModifier') v = strip_0x(redistribution) - enc.typ_literal('(uint32,uint72,uint104)') + enc.typ_literal('(uint32,uint72,uint64)') enc.bytes32(v[:64]) enc.bytes32(v[64:128]) enc.bytes32(v[128:192]) @@ -580,16 +602,18 @@ class DemurrageToken(ERC20): @classmethod def parse_redistributions(self, v): - d = ABIContractDecoder() - v = strip_0x(v) - d.typ(ABIContractType.BYTES32) - d.typ(ABIContractType.BYTES32) - d.typ(ABIContractType.BYTES32) - d.val(v[:64]) - d.val(v[64:128]) - d.val(v[128:192]) - r = d.decode() - return ''.join(r) + return strip_0x(v) + #return DemurrageRedistribution(v) +# d = ABIContractDecoder() +# v = strip_0x(v) +# d.typ(ABIContractType.BYTES32) +# d.typ(ABIContractType.BYTES32) +# d.typ(ABIContractType.BYTES32) +# d.val(v[:64]) +# d.val(v[64:128]) +# d.val(v[128:192]) +# r = d.decode() +# return ''.join(r) @classmethod @@ -640,3 +664,4 @@ class DemurrageToken(ERC20): @classmethod def parse_total_burned(self, v): return abi_decode_single(ABIContractType.UINT256, v) + diff --git a/python/tests/test_period.py b/python/tests/test_period.py index 53c9d24..4ff5457 100644 --- a/python/tests/test_period.py +++ b/python/tests/test_period.py @@ -19,9 +19,10 @@ from chainlib.eth.contract import ( # local imports from erc20_demurrage_token import DemurrageToken +from erc20_demurrage_token.token import DemurrageRedistribution # test imports -from erc20_demurrage_token.unittest.base import TestDemurrageDefault +from erc20_demurrage_token.unittest import TestDemurrageDefault logging.basicConfig(level=logging.DEBUG) logg = logging.getLogger() @@ -57,15 +58,6 @@ class TestPeriod(TestDemurrageDefault): period = c.parse_to_redistribution_period(r) self.assertEqual(2, period) - o = c.redistributions(self.address, 1, sender_address=self.accounts[0]) - r = self.rpc.do(o) - redistribution = c.parse_redistributions(r) - - o = c.to_redistribution_period(self.address, redistribution, sender_address=self.accounts[0]) - r = self.rpc.do(o) - period = c.parse_to_redistribution_period(r) - self.assertEqual(2, period) - o = c.actual_period(self.address, sender_address=self.accounts[0]) r = self.rpc.do(o) period = c.parse_actual_period(r) @@ -74,6 +66,7 @@ class TestPeriod(TestDemurrageDefault): o = c.to_redistribution_demurrage_modifier(self.address, redistribution, sender_address=self.accounts[0]) r = self.rpc.do(o) period = c.parse_to_redistribution_item(r) + redistro = DemurrageRedistribution(redistribution) # allow test code float rounding error to billionth modifier = (1 - (self.tax_level / 1000000)) ** (self.period_seconds / 60) diff --git a/python/tests/test_single.py b/python/tests/test_single.py index b1250e4..508ca07 100644 --- a/python/tests/test_single.py +++ b/python/tests/test_single.py @@ -18,7 +18,8 @@ from hexathon import ( from erc20_demurrage_token import DemurrageToken # test imports -from erc20_demurrage_token.unittest.base import TestDemurrageSingle +from erc20_demurrage_token.unittest import TestDemurrageDefault +from erc20_demurrage_token.fixed import to_fixed logging.basicConfig(level=logging.DEBUG) logg = logging.getLogger() @@ -26,11 +27,9 @@ logg = logging.getLogger() testdir = os.path.dirname(__file__) -class TestRedistributionSingle(TestDemurrageSingle): - +class TestRedistributionSingle(TestDemurrageDefault): def test_single_even_if_multiple(self): - mint_amount = 100000000 nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) @@ -64,7 +63,7 @@ class TestRedistributionSingle(TestDemurrageSingle): r = self.rpc.do(o) self.assertEqual(r['status'], 1) - tax_modifier = (1 - (self.tax_level / 1000000)) ** 10 + tax_modifier = 0.98 o = c.balance_of(self.address, self.accounts[1], sender_address=self.accounts[0]) r = self.rpc.do(o) balance = c.parse_balance(r) diff --git a/solidity/DemurrageTokenSingleNocap.sol b/solidity/DemurrageTokenSingleNocap.sol index af463a0..4bfb278 100644 --- a/solidity/DemurrageTokenSingleNocap.sol +++ b/solidity/DemurrageTokenSingleNocap.sol @@ -9,7 +9,7 @@ contract DemurrageTokenSingleCap { struct redistributionItem { uint32 period; uint72 value; - uint40 demurrage; + uint64 demurrage; } redistributionItem[] public redistributions; // uint51(unused) | uint64(demurrageModifier) | uint36(participants) | uint72(value) | uint32(period) @@ -99,7 +99,8 @@ contract DemurrageTokenSingleCap { event Redistribution(address indexed _account, uint256 indexed _period, uint256 _value); // Temporary event used in development, will be removed on prod - event Debug(bytes32 _foo); + //event Debug(bytes32 _foo); + event Debug(int128 indexed _foo, uint256 indexed _bar); // Emitted when tokens are burned event Burn(address indexed _burner, uint256 _value); @@ -128,9 +129,8 @@ contract DemurrageTokenSingleCap { periodDuration = _periodMinutes * 60; demurrageAmount = ABDKMath64x64.fromUInt(1); - //taxLevel = ABDKMath64x64.mul(ABDKMath64x64.ln(ABDKMath64x64.sub(demurrageAmount, , ABDKMath64x64.fromUInt(_periodMinutes)); taxLevel = ABDKMath64x64.ln(_taxLevel); - initialRedistribution = toRedistribution(0, uint40(uint128(demurrageAmount)), 0, 1); + initialRedistribution = toRedistribution(0, demurrageAmount, 0, 1); redistributions.push(initialRedistribution); // Misc settings @@ -170,8 +170,6 @@ contract DemurrageTokenSingleCap { currentDemurragedAmount = ABDKMath64x64.mul(baseBalance, demurrageAmount); return decayBy(ABDKMath64x64.toUInt(currentDemurragedAmount), periodCount); - - //return (baseBalance * currentDemurragedAmount) / (nanoDivider * 1000000000000); } // Balance unmodified by demurrage @@ -214,10 +212,6 @@ contract DemurrageTokenSingleCap { return true; } - function changePeriod() public { - applyDemurrage(); - } - // Creates new tokens out of thin air, and allocates them to the given address // Triggers tax function mintTo(address _beneficiary, uint256 _amount) external returns (bool) { @@ -235,12 +229,12 @@ contract DemurrageTokenSingleCap { } // Deserializes the redistribution word - function toRedistribution(uint256 _participants, uint256 _demurrageModifierPpm, uint256 _value, uint256 _period) public pure returns(redistributionItem memory) { + function toRedistribution(uint256 _participants, int128 _demurrageModifier, uint256 _value, uint256 _period) public pure returns(redistributionItem memory) { redistributionItem memory redistribution; redistribution.period = uint32(_period); redistribution.value = uint72(_value); - redistribution.demurrage = uint40(_demurrageModifierPpm); + redistribution.demurrage = uint64(uint128(_demurrageModifier) & 0xffffffffffffffff); return redistribution; } @@ -256,8 +250,14 @@ contract DemurrageTokenSingleCap { } // Serializes the number of participants part of the redistribution word - function toRedistributionDemurrageModifier(redistributionItem memory _redistribution) public pure returns (uint256) { - return uint256(_redistribution.demurrage); + function toRedistributionDemurrageModifier(redistributionItem memory _redistribution) public pure returns (int128) { + int128 r; + + r = int128(int64(_redistribution.demurrage) & int128(0x0000000000000000ffffffffffffffff)); + if (r == 0) { + r = ABDKMath64x64.fromUInt(1); + } + return r; } @@ -284,48 +284,87 @@ contract DemurrageTokenSingleCap { return uint128((block.timestamp - periodStart) / periodDuration + 1); } -// // Retrieve next redistribution if the period threshold has been crossed -// function checkPeriod() private view returns (redistributionItem memory) { -// redistributionItem memory lastRedistribution; -// redistributionItem memory emptyRedistribution; -// uint256 currentPeriod; -// -// lastRedistribution = redistributions[lastPeriod]; -// currentPeriod = this.actualPeriod(); -// if (currentPeriod <= toRedistributionPeriod(lastRedistribution)) { -// return emptyRedistribution; -// } -// return lastRedistribution; -// } + // Retrieve next redistribution if the period threshold has been crossed + function checkPeriod() private view returns (redistributionItem memory) { + redistributionItem memory lastRedistribution; + redistributionItem memory emptyRedistribution; + uint256 currentPeriod; + + lastRedistribution = redistributions[lastPeriod]; + currentPeriod = this.actualPeriod(); + if (currentPeriod <= toRedistributionPeriod(lastRedistribution)) { + return emptyRedistribution; + } + return lastRedistribution; + } + + function getDistribution(uint256 _supply, int128 _demurrageAmount) public pure returns (uint256) { + int128 difference; -// function getDistribution(uint256 _supply, uint256 _demurrageAmount) public view returns (uint256) { -// uint256 difference; -// // difference = _supply * (resolutionFactor - (_demurrageAmount * 10000000000)); // return difference / resolutionFactor; -// } + difference = ABDKMath64x64.mul(ABDKMath64x64.fromUInt(_supply), _demurrageAmount); + return ABDKMath64x64.toUInt(difference); + //return _supply; + + } -// function getDistributionFromRedistribution(redistributionItem memory _redistribution) public returns (uint256) { -// uint256 redistributionSupply; -// uint256 redistributionDemurrage; -// -// redistributionSupply = toRedistributionSupply(_redistribution); -// redistributionDemurrage = toRedistributionDemurrageModifier(_redistribution); -// return getDistribution(redistributionSupply, redistributionDemurrage); -// } -// -// // Returns the amount sent to the sink address -// function applyDefaultRedistribution(redistributionItem memory _redistribution) private returns (uint256) { -// uint256 unit; -// uint256 baseUnit; -// -// unit = getDistributionFromRedistribution(_redistribution); -// baseUnit = toBaseAmount(unit) - totalSink; -// increaseBaseBalance(sinkAddress, baseUnit); -// lastPeriod += 1; -// totalSink += baseUnit; -// return unit; -// } + function getDistributionFromRedistribution(redistributionItem memory _redistribution) public returns (uint256) { + uint256 redistributionSupply; + int128 redistributionDemurrage; + + redistributionSupply = toRedistributionSupply(_redistribution); + redistributionDemurrage = toRedistributionDemurrageModifier(_redistribution); + return getDistribution(redistributionSupply, redistributionDemurrage); + } + + // Returns the amount sent to the sink address + function applyDefaultRedistribution(redistributionItem memory _redistribution) private returns (uint256) { + uint256 unit; + uint256 baseUnit; + + unit = getDistributionFromRedistribution(_redistribution); + baseUnit = toBaseAmount(unit) - totalSink; + increaseBaseBalance(sinkAddress, baseUnit); + emit Redistribution(sinkAddress, _redistribution.period, unit); + lastPeriod += 1; + totalSink += baseUnit; + return unit; + } + + // Recalculate the demurrage modifier for the new period + // Note that the supply for the consecutive period will be taken at the time of code execution, and thus not necessarily at the time when the redistribution period threshold was crossed. + function changePeriod() public returns (bool) { + redistributionItem memory currentRedistribution; + redistributionItem memory nextRedistribution; + redistributionItem memory lastRedistribution; + uint256 currentPeriod; + int128 lastDemurrageAmount; + int128 nextRedistributionDemurrage; + uint256 demurrageCounts; + uint256 nextPeriod; + + applyDemurrage(); + currentRedistribution = checkPeriod(); + if (isEmptyRedistribution(currentRedistribution)) { + return false; + } + + // calculate the decay from previous redistributino + lastRedistribution = redistributions[lastPeriod]; + currentPeriod = toRedistributionPeriod(currentRedistribution); + nextPeriod = currentPeriod + 1; + lastDemurrageAmount = toRedistributionDemurrageModifier(lastRedistribution); + demurrageCounts = periodDuration / 60; + nextRedistributionDemurrage = ABDKMath64x64.mul(taxLevel, ABDKMath64x64.fromUInt(demurrageCounts)); + nextRedistributionDemurrage = lastDemurrageAmount - ABDKMath64x64.exp(nextRedistributionDemurrage); + nextRedistribution = toRedistribution(0, nextRedistributionDemurrage, totalSupply(), nextPeriod); + redistributions.push(nextRedistribution); + + applyDefaultRedistribution(nextRedistribution); + emit Period(nextPeriod); + return true; + } // Calculate the time delta in whole minutes passed between given timestamp and current timestamp function getMinutesDelta(uint256 _lastTimestamp) public view returns (uint256) { @@ -388,53 +427,6 @@ contract DemurrageTokenSingleCap { return true; } -// // Recalculate the demurrage modifier for the new period -// // Note that the supply for the consecutive period will be taken at the time of code execution, and thus not necessarily at the time when the redistribution period threshold was crossed. -// function changePeriod() public returns (bool) { -// redistributionItem memory currentRedistribution; -// redistributionItem memory nextRedistribution; -// redistributionItem memory lastRedistribution; -// uint256 currentPeriod; -// uint256 lastDemurrageAmount; -// uint256 nextRedistributionDemurrage; -// uint256 demurrageCounts; -// uint256 nextPeriod; -// -// applyDemurrage(); -// currentRedistribution = checkPeriod(); -// if (isEmptyRedistribution(currentRedistribution)) { -// return false; -// } -// -// // calculate the decay from previous redistributino -// lastRedistribution = redistributions[lastPeriod]; -// currentPeriod = toRedistributionPeriod(currentRedistribution); -// nextPeriod = currentPeriod + 1; -// lastDemurrageAmount = toRedistributionDemurrageModifier(lastRedistribution); -// demurrageCounts = periodDuration / 60; -// nextRedistributionDemurrage = decayBy(lastDemurrageAmount, demurrageCounts); -// -// nextRedistribution = toRedistribution(0, nextRedistributionDemurrage, totalSupply(), nextPeriod); -// redistributions.push(nextRedistribution); -// -// applyDefaultRedistribution(nextRedistribution); -// emit Period(nextPeriod); -// return true; -// } -// -// // Reverse a value reduced by demurrage by the given period to its original value -//// function growBy(uint256 _value, uint256 _period) public view returns (uint256) { -//// uint256 valueFactor; -//// uint256 truncatedTaxLevel; -//// -//// valueFactor = growthResolutionFactor; -//// truncatedTaxLevel = taxLevel / nanoDivider; -//// -//// for (uint256 i = 0; i < _period; i++) { -//// valueFactor = valueFactor + ((valueFactor * truncatedTaxLevel) / growthResolutionFactor); -//// } -//// return (valueFactor * _value) / growthResolutionFactor; -//// } // Calculate a value reduced by demurrage by the given period function decayBy(uint256 _value, uint256 _period) public view returns (uint256) {