From 2ec72bbc5579eb89915813c148906949d5ff334c Mon Sep 17 00:00:00 2001 From: lash Date: Thu, 15 Dec 2022 10:48:40 +0000 Subject: [PATCH] Add comments, remove dead code, remove make install for dead contracts --- CAVEAT | 5 +++++ ROADMAP | 8 ++++++++ VERSION | 1 + python/CHANGELOG | 4 ++++ .../data/DemurrageTokenMultiCap.bin | 1 - .../data/DemurrageTokenMultiCap.json | 1 - .../data/DemurrageTokenMultiNocap.bin | 1 - .../data/DemurrageTokenMultiNocap.json | 1 - .../data/DemurrageTokenSingleCap.bin | 1 - .../data/DemurrageTokenSingleCap.json | 1 - python/erc20_demurrage_token/unittest/base.py | 7 ------- python/setup.cfg | 2 +- python/tests/test_burn.py | 8 +++++--- python/tests/test_demurrage.py | 2 ++ solidity/DemurrageTokenSingleNocap.sol | 17 ++++------------- solidity/Makefile | 4 ++++ 16 files changed, 34 insertions(+), 30 deletions(-) create mode 100644 CAVEAT create mode 100644 ROADMAP create mode 100644 VERSION delete mode 100644 python/erc20_demurrage_token/data/DemurrageTokenMultiCap.bin delete mode 100644 python/erc20_demurrage_token/data/DemurrageTokenMultiCap.json delete mode 100644 python/erc20_demurrage_token/data/DemurrageTokenMultiNocap.bin delete mode 100644 python/erc20_demurrage_token/data/DemurrageTokenMultiNocap.json delete mode 100644 python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin delete mode 100644 python/erc20_demurrage_token/data/DemurrageTokenSingleCap.json diff --git a/CAVEAT b/CAVEAT new file mode 100644 index 0000000..db94b6e --- /dev/null +++ b/CAVEAT @@ -0,0 +1,5 @@ +The contract is intended for slow rates of decay (e.g. 2% per month). Very high levels of decay (2% per minute) will lead to overflows, and will need a more flexible implementation to support it. + +The contract is written with frequent usage in mind. If used for tokens with low usage freqency (e.g. several days idle), it is recommended to run a continuous process triggering the changePeriod() contract call, to reduce the amount of exponential calculation the application of demurrage will trigger. + +When changing the period, 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. diff --git a/ROADMAP b/ROADMAP new file mode 100644 index 0000000..75ad54d --- /dev/null +++ b/ROADMAP @@ -0,0 +1,8 @@ +- 0.1.3 + * Snapshot supply for crossed redistribution thresholds before minting new tokens. +- 0.1.4 + * Implement natural logarithm +- 0.1.5 + * Port changes from SingleNocap to SingleCap +- 0.2.0 + * Make decay resolutions configurable, to support high levels of decay. diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..d917d3e --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.1.2 diff --git a/python/CHANGELOG b/python/CHANGELOG index 8f54da5..3b61663 100644 --- a/python/CHANGELOG +++ b/python/CHANGELOG @@ -1,3 +1,7 @@ +- 0.1.2 + * Add token burn function + * Fix gas leak when calculating decay on period change + * Remove all but SingleNocap contract in make install - 0.1.1 * Settable demurrage steps for apply demurrage cli tool - 0.1.0 diff --git a/python/erc20_demurrage_token/data/DemurrageTokenMultiCap.bin b/python/erc20_demurrage_token/data/DemurrageTokenMultiCap.bin deleted file mode 100644 index 98b7c28..0000000 --- a/python/erc20_demurrage_token/data/DemurrageTokenMultiCap.bin +++ /dev/null @@ -1 +0,0 @@ -610100604052620f42406d04ee2d6d415b85acef81000000006200002491906200034f565b6080908152503480156200003757600080fd5b5060405162003db638038062003db683398181016040528101906200005d919062000601565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600c6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550866006908162000129919062000939565b5085600790816200013b919062000939565b508460ff166008819055504260038190555060035460a08181525050603c836200016691906200034f565b60c08181525050620f42406d04ee2d6d415b85acef81000000006200018c91906200034f565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508360e081815250506000620001f16000620f4240600060016200028a640100000000026401000000009004565b9050600081908060018154018082558091505060019003906000526020600020016000909190919091505581600a8190555082600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560ff16600a62000276919062000b74565b600b81905550505050505050505062000bc5565b60008073fffff00000000000000000000000000000000000608c60ff16869060020a021660010281179050710fffffffff00000000000000000000000000606860ff16879060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006200035c8262000316565b9150620003698362000316565b9250828202620003798162000316565b9150828204841483151762000393576200039262000320565b5b5092915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200040382620003b8565b810181811067ffffffffffffffff82111715620004255762000424620003c9565b5b80604052505050565b60006200043a6200039a565b9050620004488282620003f8565b919050565b600067ffffffffffffffff8211156200046b576200046a620003c9565b5b6200047682620003b8565b9050602081019050919050565b60005b83811015620004a357808201518184015260208101905062000486565b60008484015250505050565b6000620004c6620004c0846200044d565b6200042e565b905082815260208101848484011115620004e557620004e4620003b3565b5b620004f284828562000483565b509392505050565b600082601f830112620005125762000511620003ae565b5b815162000524848260208601620004af565b91505092915050565b600060ff82169050919050565b62000545816200052d565b81146200055157600080fd5b50565b60008151905062000565816200053a565b92915050565b620005768162000316565b81146200058257600080fd5b50565b60008151905062000596816200056b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620005c9826200059c565b9050919050565b620005db81620005bc565b8114620005e757600080fd5b50565b600081519050620005fb81620005d0565b92915050565b600080600080600080600060e0888a031215620006235762000622620003a4565b5b600088015167ffffffffffffffff811115620006445762000643620003a9565b5b620006528a828b01620004fa565b975050602088015167ffffffffffffffff811115620006765762000675620003a9565b5b620006848a828b01620004fa565b9650506040620006978a828b0162000554565b9550506060620006aa8a828b0162000585565b9450506080620006bd8a828b0162000585565b93505060a0620006d08a828b01620005ea565b92505060c0620006e38a828b0162000585565b91505092959891949750929550565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200074557607f821691505b6020821081036200075b576200075a620006fd565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620007c87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000786565b620007d4868362000786565b95508019841693508086168417925050509392505050565b6000819050919050565b600062000817620008116200080b8462000316565b620007ec565b62000316565b9050919050565b6000819050919050565b6200083383620007f6565b6200084b62000842826200081e565b84845462000796565b825550505050565b600090565b6200086262000853565b6200086f81848462000828565b505050565b5b8181101562000897576200088b60008262000858565b60018101905062000875565b5050565b601f821115620008e657620008b08162000761565b620008bb8462000776565b81016020851015620008cb578190505b620008e3620008da8562000776565b83018262000874565b50505b505050565b60008160020a8304905092915050565b60006200090e60001984600802620008eb565b1980831691505092915050565b6000620009298383620008fb565b9150826002028217905092915050565b6200094482620006f2565b67ffffffffffffffff81111562000960576200095f620003c9565b5b6200096c82546200072c565b620009798282856200089b565b600060209050601f831160018114620009b157600084156200099c578287015190505b620009a885826200091b565b86555062000a18565b601f198416620009c18662000761565b60005b82811015620009eb57848901518255600182019150602085019450602081019050620009c4565b8683101562000a0b578489015162000a07601f891682620008fb565b8355505b6001600288020188555050505b505050505050565b6000600282049050919050565b6000808291508390505b600185111562000a7f5780860481111562000a575762000a5662000320565b5b600185161562000a675780820291505b808102905062000a778562000a20565b945062000a37565b94509492505050565b60008262000a9a576001905062000b6d565b8162000aaa576000905062000b6d565b816001811462000ac3576002811462000ace5762000b04565b600191505062000b6d565b60ff84111562000ae35762000ae262000320565b5b8360020a91508482111562000afd5762000afc62000320565b5b5062000b6d565b5060208310610133831016604e8410600b841016171562000b3e5782820a90508381111562000b385762000b3762000320565b5b62000b6d565b62000b4d848484600162000a2d565b9250905081840481111562000b675762000b6662000320565b5b81810290505b9392505050565b600062000b818262000316565b915062000b8e8362000316565b925062000bbd7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000a88565b905092915050565b60805160a05160c05160e05161317862000c3e60003960008181610d2f01528181610f8a015281816110f401528181611d900152818161239001526123c80152600081816113fb01528181611d3e0152611e2b01526000818161142701528181611e4c0152611e9101526000611d1a01526131786000f3fe608060405234801561001057600080fd5b506004361061027b576000357c0100000000000000000000000000000000000000000000000000000000900480636787a9be1161016357806395d89b41116100e0578063b470aade116100a4578063b470aade14610832578063e3ab207a14610850578063e54d63f714610880578063e8095295146108b0578063eda4e6d6146108ce578063f2fde38b146108ec5761027b565b806395d89b4114610766578063983b2d56146107845780639da7d8ba146107b4578063a9059cbb146107e4578063ab28cea0146108145761027b565b8063731f237c11610127578063731f237c146106d057806379ba5097146106ee5780638da5cb5b1461070c5780638f1df6bc1461072a5780638f770ad0146107485761027b565b80636787a9be146105e05780636a2d094e146106105780636d5055a6146106405780636ffa8a051461067057806370a08231146106a05761027b565b806331333487116101fc578063449a52f8116101c0578063449a52f8146104e457806347a50517146105145780634abfbba21461054457806351b4541c14610574578063573cc507146105a457806358b2833b146105c25761027b565b80633133348714610406578063313ce5671461043657806335b16eb81461045457806340452d911461048457806340fc89f5146104b45761027b565b80631989c6a8116102435780631989c6a81461033a578063216ea5ec14610358578063229ba1971461038857806323b872dd146103a65780633092afd5146103d65761027b565b806301ffc9a71461028057806306fdde03146102b0578063095ea7b3146102ce57806309f28f3c146102fe57806318160ddd1461031c575b600080fd5b61029a60048036038101906102959190612942565b61091c565b6040516102a7919061298a565b60405180910390f35b6102b8610ac2565b6040516102c59190612a35565b60405180910390f35b6102e860048036038101906102e39190612aeb565b610b50565b6040516102f5919061298a565b60405180910390f35b610306610c74565b6040516103139190612b56565b60405180910390f35b610324610c96565b6040516103319190612b80565b60405180910390f35b610342610c9c565b60405161034f9190612b80565b60405180910390f35b610372600480360381019061036d9190612b9b565b610ca8565b60405161037f9190612b80565b60405180910390f35b610390610d2d565b60405161039d9190612b80565b60405180910390f35b6103c060048036038101906103bb9190612bdb565b610d51565b6040516103cd919061298a565b60405180910390f35b6103f060048036038101906103eb9190612c2e565b610e7b565b6040516103fd919061298a565b60405180910390f35b610420600480360381019061041b9190612b9b565b610f6e565b60405161042d9190612b80565b60405180910390f35b61043e61101f565b60405161044b9190612b80565b60405180910390f35b61046e60048036038101906104699190612c2e565b611025565b60405161047b919061298a565b60405180910390f35b61049e60048036038101906104999190612c5b565b611224565b6040516104ab9190612ca1565b60405180910390f35b6104ce60048036038101906104c99190612ce8565b611248565b6040516104db9190612b80565b60405180910390f35b6104fe60048036038101906104f99190612aeb565b611279565b60405161050b919061298a565b60405180910390f35b61052e60048036038101906105299190612c2e565b61139f565b60405161053b9190612b80565b60405180910390f35b61055e60048036038101906105599190612c5b565b6113f7565b60405161056b9190612b80565b60405180910390f35b61058e60048036038101906105899190612c5b565b611457565b60405161059b9190612b80565b60405180910390f35b6105ac611478565b6040516105b99190612b80565b60405180910390f35b6105ca61147e565b6040516105d79190612b80565b60405180910390f35b6105fa60048036038101906105f59190612c5b565b611484565b6040516106079190612b80565b60405180910390f35b61062a60048036038101906106259190612c5b565b6114f0565b6040516106379190612b80565b60405180910390f35b61065a60048036038101906106559190612c2e565b611511565b6040516106679190612b80565b60405180910390f35b61068a60048036038101906106859190612ce8565b61157c565b6040516106979190612b80565b60405180910390f35b6106ba60048036038101906106b59190612c2e565b6115af565b6040516106c79190612b80565b60405180910390f35b6106d8611658565b6040516106e5919061298a565b60405180910390f35b6106f6611779565b604051610703919061298a565b60405180910390f35b610714611920565b6040516107219190612d24565b60405180910390f35b610732611946565b60405161073f919061298a565b60405180910390f35b610750611afb565b60405161075d9190612b80565b60405180910390f35b61076e611b01565b60405161077b9190612a35565b60405180910390f35b61079e60048036038101906107999190612c2e565b611b8f565b6040516107ab919061298a565b60405180910390f35b6107ce60048036038101906107c99190612ce8565b611c4c565b6040516107db9190612b80565b60405180910390f35b6107fe60048036038101906107f99190612aeb565b611c78565b60405161080b919061298a565b60405180910390f35b61081c611d18565b6040516108299190612b80565b60405180910390f35b61083a611d3c565b6040516108479190612b80565b60405180910390f35b61086a60048036038101906108659190612ce8565b611d60565b6040516108779190612b80565b60405180910390f35b61089a60048036038101906108959190612b9b565b611d74565b6040516108a79190612b80565b60405180910390f35b6108b8611e25565b6040516108c59190612b56565b60405180910390f35b6108d6611e8f565b6040516108e39190612b80565b60405180910390f35b61090660048036038101906109019190612c2e565b611eb3565b604051610913919061298a565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036109705760019050610abd565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036109c25760019050610abd565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610a145760019050610abd565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610a665760019050610abd565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610ab85760019050610abd565b600090505b919050565b60068054610acf90612d6e565b80601f0160208091040260200160405190810160405280929190818152602001828054610afb90612d6e565b8015610b485780601f10610b1d57610100808354040283529160200191610b48565b820191906000526020600020905b815481529060010190602001808311610b2b57829003601f168201915b505050505081565b600080610b5b611946565b50610b6533611025565b50610b6f83611484565b905080600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610bfd9190612dce565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610c619190612b80565b60405180910390a3600191505092915050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b60095481565b60008080549050905090565b6000806000808503610cef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce690612e4e565b60405180910390fd5b838510610cfb57600080fd5b8484610d079190612e9d565b91508482610d159190612ece565b90508084610d239190612f10565b9250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000610d5e611946565b50610d6833611025565b50610d7284611484565b915081600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610dfd57600080fd5b610e08868684611f55565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610e679190612b80565b60405180910390a380925050509392505050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610f0457503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b610f0d57600080fd5b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000806000620f424091506d04ee2d6d415b85acef81000000007f0000000000000000000000000000000000000000000000000000000000000000610fb39190612e9d565b905060005b84811015610ffa57620f42408284610fd09190612ece565b610fda9190612e9d565b83610fe59190612f10565b92508080610ff290612f44565b915050610fb8565b50620f4240858361100b9190612ece565b6110159190612e9d565b9250505092915050565b60085481565b60008060008060008060008061103a89611511565b91506000821480611064575061104e611e25565b6fffffffffffffffffffffffffffffffff168210155b1561107957600097505050505050505061121f565b60006001836110889190612f10565b8154811061109957611098612f8c565b5b906000526020600020015496506110af87611248565b9450600085036110c957600097505050505050505061121f565b6110d287611c4c565b95506110dd8761157c565b90506d04ee2d6d415b85acef8100000000620f42407f000000000000000000000000000000000000000000000000000000000000000061111d9190612e9d565b86886111299190612e9d565b6111339190612ece565b61113d9190612e9d565b9350620f4240818561114f9190612ece565b6111599190612e9d565b92506cffffffff00000000000000000019600102600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825416925050819055506111c38984611ff9565b50818973ffffffffffffffffffffffffffffffffffffffff167f9a2a887706623ad3ff7fc85652deeceabe9fe1e00466c597972079ee91ea40d38560405161120b9190612b80565b60405180910390a360019750505050505050505b919050565b6000818154811061123457600080fd5b906000526020600020016000915090505481565b6000606860ff16710fffffffff00000000000000000000000000836001900416908060020a82049150509050919050565b600080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166112d257600080fd5b600a54600954846112e39190612dce565b11156112ee57600080fd5b6112f6611946565b5061130083611484565b905082600960008282546113149190612dce565b925050819055506113258482611ff9565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516113839190612b80565b60405180910390a3611393612154565b50600191505092915050565b600068ffffffffffffffffff600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460019004169050919050565b60007f0000000000000000000000000000000000000000000000000000000000000000826114259190612ece565b7f00000000000000000000000000000000000000000000000000000000000000006114509190612dce565b9050919050565b6000603c82426114679190612f10565b6114719190612e9d565b9050919050565b600b5481565b60035481565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16620f42406d04ee2d6d415b85acef8100000000846114d59190612ece565b6114df9190612ece565b6114e99190612e9d565b9050919050565b6000603c82426115009190612f10565b61150a9190612e9d565b9050919050565b6000604860ff166cffffffff000000000000000000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546001900416908060020a82049150509050919050565b6000608c60ff1673fffff00000000000000000000000000000000000836001900416908060020a82049150509050919050565b6000806000806115be8561139f565b92506115cb600354611457565b9050611607600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1682610f6e565b6fffffffffffffffffffffffffffffffff169150620f42406d04ee2d6d415b85acef81000000006116389190612ece565b82846116449190612ece565b61164e9190612e9d565b9350505050919050565b600080600080611669600354611457565b92506000830361167f5760009350505050611776565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1691506116bc8284610f6e565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550603c836117019190612ece565b60035461170e9190612dce565b60038190555081836003547fa0717e54e02bd9829db5e6e998aec0ae9de796b8d150a3cc46a92ab869697755600260009054906101000a90046fffffffffffffffffffffffffffffffff166040516117669190612ff6565b60405180910390a4600193505050505b90565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146117d657600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600080600080600080600061195f611658565b506119686121f0565b995060006001028a036119885760009a5050505050505050505050611af8565b6119918a611d60565b97506001886119a09190612dce565b90506119ab886113f7565b9150600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1694506119e9826114f0565b92506000831115611a1e576d04ee2d6d415b85acef8100000000611a0d8685611d74565b611a179190612e9d565b9350611a3b565b6d04ee2d6d415b85acef810000000085611a389190612e9d565b93505b611a4a600085600954846122eb565b98506000899080600181540180825580915050600190039060005260206000200160009091909190915055611a7e8a611248565b965060008703611a9857611a918a612377565b9550611ab2565b611aa487600954610ca8565b9550611ab0868961251e565b505b7f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d67581604051611ae19190612b80565b60405180910390a160019a50505050505050505050505b90565b600a5481565b60078054611b0e90612d6e565b80601f0160208091040260200160405190810160405280929190818152602001828054611b3a90612d6e565b8015611b875780601f10611b5c57610100808354040283529160200191611b87565b820191906000526020600020905b815481529060010190602001808311611b6a57829003601f168201915b505050505081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611beb57600080fd5b6001600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000602060ff166cffffffffffffffffff00000000836001900416908060020a82049150509050919050565b6000806000611c85611946565b50611c8f33611025565b50611c9984611484565b9150611ca6338684611f55565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051611d059190612b80565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600063ffffffff8260019004169050919050565b6000806000620f424091506d04ee2d6d415b85acef81000000007f0000000000000000000000000000000000000000000000000000000000000000611db99190612e9d565b905060005b84811015611e0057620f42408284611dd69190612ece565b611de09190612e9d565b83611deb9190612dce565b92508080611df890612f44565b915050611dbe565b50620f42408583611e119190612ece565b611e1b9190612e9d565b9250505092915050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042611e769190612f10565b611e809190612e9d565b611e8a9190612dce565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f0f57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b600080611f628584612607565b50611f6d8484611ff9565b50611f76611e25565b6fffffffffffffffffffffffffffffffff169050600b548310158015611fa4575080611fa186611511565b14155b8015611fdc57508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15611fed57611feb8582612737565b505b60019150509392505050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460019004905060008503612059576000935050505061214e565b6120628661139f565b925084836120709190612dce565b91508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16116120e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d79061305d565b60405180910390fd5b68ffffffffffffffffff198116905068ffffffffffffffffff82168117905080600102600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000806000600160008054905061216b9190612f10565b8154811061217c5761217b612f8c565b5b90600052602060002001546001900490506cffffffffffffffffff000000001981169050602060ff166009549060020a028117905080600102600060016000805490506121c99190612f10565b815481106121da576121d9612f8c565b5b9060005260206000200181905550600191505090565b60008060008060016000805490506122089190612f10565b8154811061221957612218612f8c565b5b906000526020600020015491503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381865afa15801561228d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b191906130a9565b6fffffffffffffffffffffffffffffffff1690506122ce82611d60565b81116122e2576000600102925050506122e8565b81925050505b90565b60008073fffff00000000000000000000000000000000000608c60ff16869060020a021660010281179050710fffffffff00000000000000000000000000606860ff16879060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b600080600080600061238886611c4c565b9350620f42407f0000000000000000000000000000000000000000000000000000000000000000856123ba9190612ece565b6123c49190612e9d565b91507f0000000000000000000000000000000000000000000000000000000000000000620f4240836123f69190612ece565b6124009190612e9d565b9050838110156124cc5761241386611d60565b9250710fffffffff0000000000000000000000000019600102600060018561243b9190612f10565b8154811061244c5761244b612f8c565b5b9060005260206000200160008282541692505081905550606860ff1660019060020a027f80000000000000000000000000000000000000000000000000000000000000001760010260006001856124a39190612f10565b815481106124b4576124b3612f8c565b5b90600052602060002001600082825417925050819055505b612511600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166d04ee2d6d415b85acef81000000008461250c9190612e9d565b611ff9565b5081945050505050919050565b60008060008403612533576000915050612601565b7f800000000000000000000000000000000000000000000000000000000000000060010260006001856125669190612f10565b8154811061257757612576612f8c565b5b90600052602060002001600082825417925050819055506125c160006001856125a09190612f10565b815481106125b1576125b0612f8c565b5b9060005260206000200154611c4c565b90506125fa600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685836125f59190612f10565b611ff9565b5060019150505b92915050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600190049050600085036126675760009350505050612731565b6126708661139f565b9250848310156126b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126ac90613122565b60405180910390fd5b84836126c19190612f10565b915068ffffffffffffffffff198116905068ffffffffffffffffff82168117905080600102600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b60006cffffffff00000000000000000019600102600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825416925050819055506cffffffff000000000000000000604860ff16839060020a0216600102600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282541792505081905550612808612813565b506001905092915050565b6000806000806000600160008054905061282d9190612f10565b8154811061283e5761283d612f8c565b5b90600052602060002001549250600161285684611248565b6128609190612dce565b905082600190049150710fffffffff000000000000000000000000001982169150710fffffffff00000000000000000000000000606860ff16829060020a02168217915081600102600060016000805490506128bc9190612f10565b815481106128cd576128cc612f8c565b5b90600052602060002001819055506001935050505090565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61291f816128ea565b811461292a57600080fd5b50565b60008135905061293c81612916565b92915050565b600060208284031215612958576129576128e5565b5b60006129668482850161292d565b91505092915050565b60008115159050919050565b6129848161296f565b82525050565b600060208201905061299f600083018461297b565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156129df5780820151818401526020810190506129c4565b60008484015250505050565b6000601f19601f8301169050919050565b6000612a07826129a5565b612a1181856129b0565b9350612a218185602086016129c1565b612a2a816129eb565b840191505092915050565b60006020820190508181036000830152612a4f81846129fc565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a8282612a57565b9050919050565b612a9281612a77565b8114612a9d57600080fd5b50565b600081359050612aaf81612a89565b92915050565b6000819050919050565b612ac881612ab5565b8114612ad357600080fd5b50565b600081359050612ae581612abf565b92915050565b60008060408385031215612b0257612b016128e5565b5b6000612b1085828601612aa0565b9250506020612b2185828601612ad6565b9150509250929050565b60006fffffffffffffffffffffffffffffffff82169050919050565b612b5081612b2b565b82525050565b6000602082019050612b6b6000830184612b47565b92915050565b612b7a81612ab5565b82525050565b6000602082019050612b956000830184612b71565b92915050565b60008060408385031215612bb257612bb16128e5565b5b6000612bc085828601612ad6565b9250506020612bd185828601612ad6565b9150509250929050565b600080600060608486031215612bf457612bf36128e5565b5b6000612c0286828701612aa0565b9350506020612c1386828701612aa0565b9250506040612c2486828701612ad6565b9150509250925092565b600060208284031215612c4457612c436128e5565b5b6000612c5284828501612aa0565b91505092915050565b600060208284031215612c7157612c706128e5565b5b6000612c7f84828501612ad6565b91505092915050565b6000819050919050565b612c9b81612c88565b82525050565b6000602082019050612cb66000830184612c92565b92915050565b612cc581612c88565b8114612cd057600080fd5b50565b600081359050612ce281612cbc565b92915050565b600060208284031215612cfe57612cfd6128e5565b5b6000612d0c84828501612cd3565b91505092915050565b612d1e81612a77565b82525050565b6000602082019050612d396000830184612d15565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612d8657607f821691505b602082108103612d9957612d98612d3f565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612dd982612ab5565b9150612de483612ab5565b9250828201905080821115612dfc57612dfb612d9f565b5b92915050565b7f4552525f4e554d50415254535f5a45524f000000000000000000000000000000600082015250565b6000612e386011836129b0565b9150612e4382612e02565b602082019050919050565b60006020820190508181036000830152612e6781612e2b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612ea882612ab5565b9150612eb383612ab5565b925082612ec357612ec2612e6e565b5b828204905092915050565b6000612ed982612ab5565b9150612ee483612ab5565b9250828202612ef281612ab5565b91508282048414831517612f0957612f08612d9f565b5b5092915050565b6000612f1b82612ab5565b9150612f2683612ab5565b9250828203905081811115612f3e57612f3d612d9f565b5b92915050565b6000612f4f82612ab5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612f8157612f80612d9f565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b6000612fe0612fdb612fd684612b2b565b612fbb565b612ab5565b9050919050565b612ff081612fc5565b82525050565b600060208201905061300b6000830184612fe7565b92915050565b7f4552525f574f554c445752415000000000000000000000000000000000000000600082015250565b6000613047600d836129b0565b915061305282613011565b602082019050919050565b600060208201905081810360008301526130768161303a565b9050919050565b61308681612b2b565b811461309157600080fd5b50565b6000815190506130a38161307d565b92915050565b6000602082840312156130bf576130be6128e5565b5b60006130cd84828501613094565b91505092915050565b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b600061310c600d836129b0565b9150613117826130d6565b602082019050919050565b6000602082019050818103600083015261313b816130ff565b905091905056fea2646970667358221220f6c3f7ce7176aeb3def8a31a0be044e8d2b1243b776f0138f0c813c02be2c1e364736f6c63430008110033 \ No newline at end of file diff --git a/python/erc20_demurrage_token/data/DemurrageTokenMultiCap.json b/python/erc20_demurrage_token/data/DemurrageTokenMultiCap.json deleted file mode 100644 index 7a7450f..0000000 --- a/python/erc20_demurrage_token/data/DemurrageTokenMultiCap.json +++ /dev/null @@ -1 +0,0 @@ -[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"_taxLevelMinute","type":"uint256"},{"internalType":"uint256","name":"_periodMinutes","type":"uint256"},{"internalType":"address","name":"_defaultSinkAddress","type":"address"},{"internalType":"uint256","name":"_supplyCap","type":"uint256"}],"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":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":"uint256","name":"_oldAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newAmount","type":"uint256"}],"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":[{"internalType":"address","name":"_account","type":"address"}],"name":"accountPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"applyRedistributionOnAccount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"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":[],"name":"demurrageAmount","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"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":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"growBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumParticipantSpend","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":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numParts","type":"uint256"},{"internalType":"uint256","name":"_sumWhole","type":"uint256"}],"name":"remainder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resolutionFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"supplyCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"","type":"uint256"}],"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":"bytes32","name":"redistribution","type":"bytes32"}],"name":"toRedistributionDemurrageModifier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"redistribution","type":"bytes32"}],"name":"toRedistributionParticipants","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"redistribution","type":"bytes32"}],"name":"toRedistributionPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"redistribution","type":"bytes32"}],"name":"toRedistributionSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","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/data/DemurrageTokenMultiNocap.bin b/python/erc20_demurrage_token/data/DemurrageTokenMultiNocap.bin deleted file mode 100644 index e094bfe..0000000 --- a/python/erc20_demurrage_token/data/DemurrageTokenMultiNocap.bin +++ /dev/null @@ -1 +0,0 @@ -610100604052620f42406d04ee2d6d415b85acef810000000062000024919062000378565b6080908152503480156200003757600080fd5b5060405162003e3d38038062003e3d83398181016040528101906200005d91906200062a565b33600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600a6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555085600590816200012991906200094b565b5084600690816200013b91906200094b565b508360ff166007819055504260a08181525050603c826200015d919062000378565b60c08181525050620f42406d04ee2d6d415b85acef810000000062000183919062000378565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506001600260106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508260e081815250506000620002226000620f424060006001620002b3640100000000026401000000009004565b9050600081908060018154018082558091505060019003906000526020600020016000909190919091505581600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508460ff16600a620002a0919062000b86565b6009819055505050505050505062000bd7565b60008073fffff00000000000000000000000000000000000608c60ff16869060020a021660010281179050710fffffffff00000000000000000000000000606860ff16879060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000385826200033f565b915062000392836200033f565b9250828202620003a2816200033f565b91508282048414831517620003bc57620003bb62000349565b5b5092915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200042c82620003e1565b810181811067ffffffffffffffff821117156200044e576200044d620003f2565b5b80604052505050565b600062000463620003c3565b905062000471828262000421565b919050565b600067ffffffffffffffff821115620004945762000493620003f2565b5b6200049f82620003e1565b9050602081019050919050565b60005b83811015620004cc578082015181840152602081019050620004af565b60008484015250505050565b6000620004ef620004e98462000476565b62000457565b9050828152602081018484840111156200050e576200050d620003dc565b5b6200051b848285620004ac565b509392505050565b600082601f8301126200053b576200053a620003d7565b5b81516200054d848260208601620004d8565b91505092915050565b600060ff82169050919050565b6200056e8162000556565b81146200057a57600080fd5b50565b6000815190506200058e8162000563565b92915050565b6200059f816200033f565b8114620005ab57600080fd5b50565b600081519050620005bf8162000594565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620005f282620005c5565b9050919050565b6200060481620005e5565b81146200061057600080fd5b50565b6000815190506200062481620005f9565b92915050565b60008060008060008060c087890312156200064a5762000649620003cd565b5b600087015167ffffffffffffffff8111156200066b576200066a620003d2565b5b6200067989828a0162000523565b965050602087015167ffffffffffffffff8111156200069d576200069c620003d2565b5b620006ab89828a0162000523565b9550506040620006be89828a016200057d565b9450506060620006d189828a01620005ae565b9350506080620006e489828a01620005ae565b92505060a0620006f789828a0162000613565b9150509295509295509295565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200075757607f821691505b6020821081036200076d576200076c6200070f565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620007da7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000798565b620007e6868362000798565b95508019841693508086168417925050509392505050565b6000819050919050565b600062000829620008236200081d846200033f565b620007fe565b6200033f565b9050919050565b6000819050919050565b620008458362000808565b6200085d620008548262000830565b848454620007a8565b825550505050565b600090565b6200087462000865565b620008818184846200083a565b505050565b5b81811015620008a9576200089d6000826200086a565b60018101905062000887565b5050565b601f821115620008f857620008c28162000773565b620008cd8462000788565b81016020851015620008dd578190505b620008f5620008ec8562000788565b83018262000886565b50505b505050565b60008160020a8304905092915050565b60006200092060001984600802620008fd565b1980831691505092915050565b60006200093b83836200090d565b9150826002028217905092915050565b620009568262000704565b67ffffffffffffffff811115620009725762000971620003f2565b5b6200097e82546200073e565b6200098b828285620008ad565b600060209050601f831160018114620009c35760008415620009ae578287015190505b620009ba85826200092d565b86555062000a2a565b601f198416620009d38662000773565b60005b82811015620009fd57848901518255600182019150602085019450602081019050620009d6565b8683101562000a1d578489015162000a19601f8916826200090d565b8355505b6001600288020188555050505b505050505050565b6000600282049050919050565b6000808291508390505b600185111562000a915780860481111562000a695762000a6862000349565b5b600185161562000a795780820291505b808102905062000a898562000a32565b945062000a49565b94509492505050565b60008262000aac576001905062000b7f565b8162000abc576000905062000b7f565b816001811462000ad5576002811462000ae05762000b16565b600191505062000b7f565b60ff84111562000af55762000af462000349565b5b8360020a91508482111562000b0f5762000b0e62000349565b5b5062000b7f565b5060208310610133831016604e8410600b841016171562000b505782820a90508381111562000b4a5762000b4962000349565b5b62000b7f565b62000b5f848484600162000a3f565b9250905081840481111562000b795762000b7862000349565b5b81810290505b9392505050565b600062000b93826200033f565b915062000ba0836200033f565b925062000bcf7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000a9a565b905092915050565b60805160a05160c05160e0516131ed62000c5060003960008181610ccb01528181610f260152818161109001528181611dc1015281816123c101526123f901526000818161137301528181611d6f0152611e5c01526000818161139f01528181611e7d0152611ec201526000611d4b01526131ed6000f3fe608060405234801561001057600080fd5b5060043610610265576000357c0100000000000000000000000000000000000000000000000000000000900480636a2d094e116101585780639da7d8ba116100d5578063e3ab207a11610099578063e3ab207a146107ec578063e54d63f71461081c578063e80952951461084c578063eda4e6d61461086a578063f2fde38b1461088857610265565b80639da7d8ba14610732578063a2119e2f14610762578063a9059cbb14610780578063ab28cea0146107b0578063b470aade146107ce57610265565b806379ba50971161011c57806379ba50971461068a5780638da5cb5b146106a85780638f1df6bc146106c657806395d89b41146106e4578063983b2d561461070257610265565b80636a2d094e146105ac5780636d5055a6146105dc5780636ffa8a051461060c57806370a082311461063c578063731f237c1461066c57610265565b806331333487116101e6578063449a52f8116101aa578063449a52f8146104ce57806347a50517146104fe5780634abfbba21461052e578063573cc5071461055e5780636787a9be1461057c57610265565b806331333487146103f0578063313ce5671461042057806335b16eb81461043e57806340452d911461046e57806340fc89f51461049e57610265565b80631989c6a81161022d5780631989c6a814610324578063216ea5ec14610342578063229ba1971461037257806323b872dd146103905780633092afd5146103c057610265565b806301ffc9a71461026a57806306fdde031461029a578063095ea7b3146102b857806309f28f3c146102e857806318160ddd14610306575b600080fd5b610284600480360381019061027f9190612973565b6108b8565b60405161029191906129bb565b60405180910390f35b6102a2610a5e565b6040516102af9190612a66565b60405180910390f35b6102d260048036038101906102cd9190612b1c565b610aec565b6040516102df91906129bb565b60405180910390f35b6102f0610c10565b6040516102fd9190612b87565b60405180910390f35b61030e610c32565b60405161031b9190612bb1565b60405180910390f35b61032c610c38565b6040516103399190612bb1565b60405180910390f35b61035c60048036038101906103579190612bcc565b610c44565b6040516103699190612bb1565b60405180910390f35b61037a610cc9565b6040516103879190612bb1565b60405180910390f35b6103aa60048036038101906103a59190612c0c565b610ced565b6040516103b791906129bb565b60405180910390f35b6103da60048036038101906103d59190612c5f565b610e17565b6040516103e791906129bb565b60405180910390f35b61040a60048036038101906104059190612bcc565b610f0a565b6040516104179190612bb1565b60405180910390f35b610428610fbb565b6040516104359190612bb1565b60405180910390f35b61045860048036038101906104539190612c5f565b610fc1565b60405161046591906129bb565b60405180910390f35b61048860048036038101906104839190612c8c565b6111c0565b6040516104959190612cd2565b60405180910390f35b6104b860048036038101906104b39190612d19565b6111e4565b6040516104c59190612bb1565b60405180910390f35b6104e860048036038101906104e39190612b1c565b611215565b6040516104f591906129bb565b60405180910390f35b61051860048036038101906105139190612c5f565b611317565b6040516105259190612bb1565b60405180910390f35b61054860048036038101906105439190612c8c565b61136f565b6040516105559190612bb1565b60405180910390f35b6105666113cf565b6040516105739190612bb1565b60405180910390f35b61059660048036038101906105919190612c8c565b6113d5565b6040516105a39190612bb1565b60405180910390f35b6105c660048036038101906105c19190612c8c565b611441565b6040516105d39190612bb1565b60405180910390f35b6105f660048036038101906105f19190612c5f565b611462565b6040516106039190612bb1565b60405180910390f35b61062660048036038101906106219190612d19565b6114cd565b6040516106339190612bb1565b60405180910390f35b61065660048036038101906106519190612c5f565b611500565b6040516106639190612bb1565b60405180910390f35b6106746115e1565b60405161068191906129bb565b60405180910390f35b61069261178e565b60405161069f91906129bb565b60405180910390f35b6106b0611935565b6040516106bd9190612d55565b60405180910390f35b6106ce61195b565b6040516106db91906129bb565b60405180910390f35b6106ec611b10565b6040516106f99190612a66565b60405180910390f35b61071c60048036038101906107179190612c5f565b611b9e565b60405161072991906129bb565b60405180910390f35b61074c60048036038101906107479190612d19565b611c5b565b6040516107599190612bb1565b60405180910390f35b61076a611c87565b6040516107779190612b87565b60405180910390f35b61079a60048036038101906107959190612b1c565b611ca9565b6040516107a791906129bb565b60405180910390f35b6107b8611d49565b6040516107c59190612bb1565b60405180910390f35b6107d6611d6d565b6040516107e39190612bb1565b60405180910390f35b61080660048036038101906108019190612d19565b611d91565b6040516108139190612bb1565b60405180910390f35b61083660048036038101906108319190612bcc565b611da5565b6040516108439190612bb1565b60405180910390f35b610854611e56565b6040516108619190612b87565b60405180910390f35b610872611ec0565b60405161087f9190612bb1565b60405180910390f35b6108a2600480360381019061089d9190612c5f565b611ee4565b6040516108af91906129bb565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361090c5760019050610a59565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361095e5760019050610a59565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036109b05760019050610a59565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610a025760019050610a59565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610a545760019050610a59565b600090505b919050565b60058054610a6b90612d9f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9790612d9f565b8015610ae45780601f10610ab957610100808354040283529160200191610ae4565b820191906000526020600020905b815481529060010190602001808311610ac757829003601f168201915b505050505081565b600080610af761195b565b50610b0133610fc1565b50610b0b836113d5565b905080600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b999190612dff565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610bfd9190612bb1565b60405180910390a3600191505092915050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b60085481565b60008080549050905090565b6000806000808503610c8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8290612e7f565b60405180910390fd5b838510610c9757600080fd5b8484610ca39190612ece565b91508482610cb19190612eff565b90508084610cbf9190612f41565b9250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000610cfa61195b565b50610d0433610fc1565b50610d0e846113d5565b915081600b60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610d9957600080fd5b610da4868684611f86565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610e039190612bb1565b60405180910390a380925050509392505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610ea057503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b610ea957600080fd5b6000600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000806000620f424091506d04ee2d6d415b85acef81000000007f0000000000000000000000000000000000000000000000000000000000000000610f4f9190612ece565b905060005b84811015610f9657620f42408284610f6c9190612eff565b610f769190612ece565b83610f819190612f41565b92508080610f8e90612f75565b915050610f54565b50620f42408583610fa79190612eff565b610fb19190612ece565b9250505092915050565b60075481565b600080600080600080600080610fd689611462565b915060008214806110005750610fea611e56565b6fffffffffffffffffffffffffffffffff168210155b156110155760009750505050505050506111bb565b60006001836110249190612f41565b8154811061103557611034612fbd565b5b9060005260206000200154965061104b876111e4565b9450600085036110655760009750505050505050506111bb565b61106e87611c5b565b9550611079876114cd565b90506d04ee2d6d415b85acef8100000000620f42407f00000000000000000000000000000000000000000000000000000000000000006110b99190612ece565b86886110c59190612ece565b6110cf9190612eff565b6110d99190612ece565b9350620f424081856110eb9190612eff565b6110f59190612ece565b92506cffffffff00000000000000000019600102600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254169250508190555061115f898461202a565b50818973ffffffffffffffffffffffffffffffffffffffff167f9a2a887706623ad3ff7fc85652deeceabe9fe1e00466c597972079ee91ea40d3856040516111a79190612bb1565b60405180910390a360019750505050505050505b919050565b600081815481106111d057600080fd5b906000526020600020016000915090505481565b6000606860ff16710fffffffff00000000000000000000000000836001900416908060020a82049150509050919050565b600080600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661126e57600080fd5b61127661195b565b50829050826008600082825461128c9190612dff565b9250508190555061129d848261202a565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516112fb9190612bb1565b60405180910390a361130b612185565b50600191505092915050565b600068ffffffffffffffffff600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460019004169050919050565b60007f00000000000000000000000000000000000000000000000000000000000000008261139d9190612eff565b7f00000000000000000000000000000000000000000000000000000000000000006113c89190612dff565b9050919050565b60095481565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16620f42406d04ee2d6d415b85acef8100000000846114269190612eff565b6114309190612eff565b61143a9190612ece565b9050919050565b6000603c82426114519190612f41565b61145b9190612ece565b9050919050565b6000604860ff166cffffffff000000000000000000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546001900416908060020a82049150509050919050565b6000608c60ff1673fffff00000000000000000000000000000000000836001900416908060020a82049150509050919050565b60008060008061150f85611317565b9250600260109054906101000a90046fffffffffffffffffffffffffffffffff16611538611e56565b6115429190612fec565b6fffffffffffffffffffffffffffffffff169050611590600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1682610f0a565b6fffffffffffffffffffffffffffffffff169150620f42406d04ee2d6d415b85acef81000000006115c19190612eff565b82846115cd9190612eff565b6115d79190612ece565b9350505050919050565b60008060008060006115f1611e56565b9350600260109054906101000a90046fffffffffffffffffffffffffffffffff168461161d9190612fec565b92506000836fffffffffffffffffffffffffffffffff160361164657600094505050505061178b565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16915061169582846fffffffffffffffffffffffffffffffff16610f0a565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555083600260106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555081836fffffffffffffffffffffffffffffffff16856fffffffffffffffffffffffffffffffff167fa0717e54e02bd9829db5e6e998aec0ae9de796b8d150a3cc46a92ab869697755600260009054906101000a90046fffffffffffffffffffffffffffffffff1660405161177a919061306b565b60405180910390a460019450505050505b90565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146117eb57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000806000806000806000806000611974612221565b995060006001028a036119945760009a5050505050505050505050611b0d565b61199d8a611d91565b97506001886119ac9190612dff565b90506119b78861136f565b91506119c16115e1565b50600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1694506119fe82611441565b92506000831115611a33576d04ee2d6d415b85acef8100000000611a228685611da5565b611a2c9190612ece565b9350611a50565b6d04ee2d6d415b85acef810000000085611a4d9190612ece565b93505b611a5f6000856008548461231c565b98506000899080600181540180825580915050600190039060005260206000200160009091909190915055611a938a6111e4565b965060008703611aad57611aa68a6123a8565b9550611ac7565b611ab987600854610c44565b9550611ac5868961254f565b505b7f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d67581604051611af69190612bb1565b60405180910390a160019a50505050505050505050505b90565b60068054611b1d90612d9f565b80601f0160208091040260200160405190810160405280929190818152602001828054611b4990612d9f565b8015611b965780601f10611b6b57610100808354040283529160200191611b96565b820191906000526020600020905b815481529060010190602001808311611b7957829003601f168201915b505050505081565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611bfa57600080fd5b6001600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000602060ff166cffffffffffffffffff00000000836001900416908060020a82049150509050919050565b600260109054906101000a90046fffffffffffffffffffffffffffffffff1681565b6000806000611cb661195b565b50611cc033610fc1565b50611cca846113d5565b9150611cd7338684611f86565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051611d369190612bb1565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600063ffffffff8260019004169050919050565b6000806000620f424091506d04ee2d6d415b85acef81000000007f0000000000000000000000000000000000000000000000000000000000000000611dea9190612ece565b905060005b84811015611e3157620f42408284611e079190612eff565b611e119190612ece565b83611e1c9190612dff565b92508080611e2990612f75565b915050611def565b50620f42408583611e429190612eff565b611e4c9190612ece565b9250505092915050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042611ea79190612f41565b611eb19190612ece565b611ebb9190612dff565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f4057600080fd5b81600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b600080611f938584612638565b50611f9e848461202a565b50611fa7611e56565b6fffffffffffffffffffffffffffffffff1690506009548310158015611fd5575080611fd286611462565b14155b801561200d57508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b1561201e5761201c8582612768565b505b60019150509392505050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546001900490506000850361208a576000935050505061217f565b61209386611317565b925084836120a19190612dff565b91508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1611612111576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612108906130d2565b60405180910390fd5b68ffffffffffffffffff198116905068ffffffffffffffffff82168117905080600102600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000806000600160008054905061219c9190612f41565b815481106121ad576121ac612fbd565b5b90600052602060002001546001900490506cffffffffffffffffff000000001981169050602060ff166008549060020a028117905080600102600060016000805490506121fa9190612f41565b8154811061220b5761220a612fbd565b5b9060005260206000200181905550600191505090565b60008060008060016000805490506122399190612f41565b8154811061224a57612249612fbd565b5b906000526020600020015491503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381865afa1580156122be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122e2919061311e565b6fffffffffffffffffffffffffffffffff1690506122ff82611d91565b811161231357600060010292505050612319565b81925050505b90565b60008073fffff00000000000000000000000000000000000608c60ff16869060020a021660010281179050710fffffffff00000000000000000000000000606860ff16879060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b60008060008060006123b986611c5b565b9350620f42407f0000000000000000000000000000000000000000000000000000000000000000856123eb9190612eff565b6123f59190612ece565b91507f0000000000000000000000000000000000000000000000000000000000000000620f4240836124279190612eff565b6124319190612ece565b9050838110156124fd5761244486611d91565b9250710fffffffff0000000000000000000000000019600102600060018561246c9190612f41565b8154811061247d5761247c612fbd565b5b9060005260206000200160008282541692505081905550606860ff1660019060020a027f80000000000000000000000000000000000000000000000000000000000000001760010260006001856124d49190612f41565b815481106124e5576124e4612fbd565b5b90600052602060002001600082825417925050819055505b612542600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166d04ee2d6d415b85acef81000000008461253d9190612ece565b61202a565b5081945050505050919050565b60008060008403612564576000915050612632565b7f800000000000000000000000000000000000000000000000000000000000000060010260006001856125979190612f41565b815481106125a8576125a7612fbd565b5b90600052602060002001600082825417925050819055506125f260006001856125d19190612f41565b815481106125e2576125e1612fbd565b5b9060005260206000200154611c5b565b905061262b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685836126269190612f41565b61202a565b5060019150505b92915050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600190049050600085036126985760009350505050612762565b6126a186611317565b9250848310156126e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126dd90613197565b60405180910390fd5b84836126f29190612f41565b915068ffffffffffffffffff198116905068ffffffffffffffffff82168117905080600102600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b60006cffffffff00000000000000000019600102600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825416925050819055506cffffffff000000000000000000604860ff16839060020a0216600102600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282541792505081905550612839612844565b506001905092915050565b6000806000806000600160008054905061285e9190612f41565b8154811061286f5761286e612fbd565b5b906000526020600020015492506001612887846111e4565b6128919190612dff565b905082600190049150710fffffffff000000000000000000000000001982169150710fffffffff00000000000000000000000000606860ff16829060020a02168217915081600102600060016000805490506128ed9190612f41565b815481106128fe576128fd612fbd565b5b90600052602060002001819055506001935050505090565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6129508161291b565b811461295b57600080fd5b50565b60008135905061296d81612947565b92915050565b60006020828403121561298957612988612916565b5b60006129978482850161295e565b91505092915050565b60008115159050919050565b6129b5816129a0565b82525050565b60006020820190506129d060008301846129ac565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612a105780820151818401526020810190506129f5565b60008484015250505050565b6000601f19601f8301169050919050565b6000612a38826129d6565b612a4281856129e1565b9350612a528185602086016129f2565b612a5b81612a1c565b840191505092915050565b60006020820190508181036000830152612a808184612a2d565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612ab382612a88565b9050919050565b612ac381612aa8565b8114612ace57600080fd5b50565b600081359050612ae081612aba565b92915050565b6000819050919050565b612af981612ae6565b8114612b0457600080fd5b50565b600081359050612b1681612af0565b92915050565b60008060408385031215612b3357612b32612916565b5b6000612b4185828601612ad1565b9250506020612b5285828601612b07565b9150509250929050565b60006fffffffffffffffffffffffffffffffff82169050919050565b612b8181612b5c565b82525050565b6000602082019050612b9c6000830184612b78565b92915050565b612bab81612ae6565b82525050565b6000602082019050612bc66000830184612ba2565b92915050565b60008060408385031215612be357612be2612916565b5b6000612bf185828601612b07565b9250506020612c0285828601612b07565b9150509250929050565b600080600060608486031215612c2557612c24612916565b5b6000612c3386828701612ad1565b9350506020612c4486828701612ad1565b9250506040612c5586828701612b07565b9150509250925092565b600060208284031215612c7557612c74612916565b5b6000612c8384828501612ad1565b91505092915050565b600060208284031215612ca257612ca1612916565b5b6000612cb084828501612b07565b91505092915050565b6000819050919050565b612ccc81612cb9565b82525050565b6000602082019050612ce76000830184612cc3565b92915050565b612cf681612cb9565b8114612d0157600080fd5b50565b600081359050612d1381612ced565b92915050565b600060208284031215612d2f57612d2e612916565b5b6000612d3d84828501612d04565b91505092915050565b612d4f81612aa8565b82525050565b6000602082019050612d6a6000830184612d46565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612db757607f821691505b602082108103612dca57612dc9612d70565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612e0a82612ae6565b9150612e1583612ae6565b9250828201905080821115612e2d57612e2c612dd0565b5b92915050565b7f4552525f4e554d50415254535f5a45524f000000000000000000000000000000600082015250565b6000612e696011836129e1565b9150612e7482612e33565b602082019050919050565b60006020820190508181036000830152612e9881612e5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612ed982612ae6565b9150612ee483612ae6565b925082612ef457612ef3612e9f565b5b828204905092915050565b6000612f0a82612ae6565b9150612f1583612ae6565b9250828202612f2381612ae6565b91508282048414831517612f3a57612f39612dd0565b5b5092915050565b6000612f4c82612ae6565b9150612f5783612ae6565b9250828203905081811115612f6f57612f6e612dd0565b5b92915050565b6000612f8082612ae6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612fb257612fb1612dd0565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612ff782612b5c565b915061300283612b5c565b925082820390506fffffffffffffffffffffffffffffffff81111561302a57613029612dd0565b5b92915050565b6000819050919050565b600061305561305061304b84612b5c565b613030565b612ae6565b9050919050565b6130658161303a565b82525050565b6000602082019050613080600083018461305c565b92915050565b7f4552525f574f554c445752415000000000000000000000000000000000000000600082015250565b60006130bc600d836129e1565b91506130c782613086565b602082019050919050565b600060208201905081810360008301526130eb816130af565b9050919050565b6130fb81612b5c565b811461310657600080fd5b50565b600081519050613118816130f2565b92915050565b60006020828403121561313457613133612916565b5b600061314284828501613109565b91505092915050565b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b6000613181600d836129e1565b915061318c8261314b565b602082019050919050565b600060208201905081810360008301526131b081613174565b905091905056fea2646970667358221220f2d0778aaedf04ef72fd5734950fa534481c2c6e30df88849802da83cc11813664736f6c63430008110033 \ No newline at end of file diff --git a/python/erc20_demurrage_token/data/DemurrageTokenMultiNocap.json b/python/erc20_demurrage_token/data/DemurrageTokenMultiNocap.json deleted file mode 100644 index 970e47c..0000000 --- a/python/erc20_demurrage_token/data/DemurrageTokenMultiNocap.json +++ /dev/null @@ -1 +0,0 @@ -[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"_taxLevelMinute","type":"uint256"},{"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":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":"uint256","name":"_oldAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newAmount","type":"uint256"}],"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":[{"internalType":"address","name":"_account","type":"address"}],"name":"accountPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"applyRedistributionOnAccount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"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":[],"name":"demurrageAmount","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"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":"demurragePeriod","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"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":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"growBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumParticipantSpend","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":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numParts","type":"uint256"},{"internalType":"uint256","name":"_sumWhole","type":"uint256"}],"name":"remainder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resolutionFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"","type":"uint256"}],"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":"bytes32","name":"redistribution","type":"bytes32"}],"name":"toRedistributionDemurrageModifier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"redistribution","type":"bytes32"}],"name":"toRedistributionParticipants","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"redistribution","type":"bytes32"}],"name":"toRedistributionPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"redistribution","type":"bytes32"}],"name":"toRedistributionSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","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/data/DemurrageTokenSingleCap.bin b/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin deleted file mode 100644 index c831e0c..0000000 --- a/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin +++ /dev/null @@ -1 +0,0 @@ -61010060405264e8d4a510006a52b7d2dcc80cd2e40000006200002391906200035c565b6080908152503480156200003657600080fd5b50604051620037e9380380620037e983398181016040528101906200005c91906200065b565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600c6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550866006908162000128919062000993565b5085600790816200013a919062000993565b508460ff166008819055504260038190555060035460a08181525050603c836200016591906200035c565b60c081815250506b204fce5e3e25026110000000600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550836fffffffffffffffffffffffffffffffff1660e0818152505060006200021d6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1660006001620002b6640100000000026401000000009004565b9050600081908060018154018082558091505060019003906000526020600020016000909190919091505581600a8190555082600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560ff16600a620002a2919062000bce565b600b81905550505050505050505062000c1f565b6000807affffffffffffffffffffffffffff00000000000000000000000000606860ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000620003698262000323565b9150620003768362000323565b9250828202620003868162000323565b91508282048414831517620003a0576200039f6200032d565b5b5092915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200041082620003c5565b810181811067ffffffffffffffff82111715620004325762000431620003d6565b5b80604052505050565b600062000447620003a7565b905062000455828262000405565b919050565b600067ffffffffffffffff821115620004785762000477620003d6565b5b6200048382620003c5565b9050602081019050919050565b60005b83811015620004b057808201518184015260208101905062000493565b60008484015250505050565b6000620004d3620004cd846200045a565b6200043b565b905082815260208101848484011115620004f257620004f1620003c0565b5b620004ff84828562000490565b509392505050565b600082601f8301126200051f576200051e620003bb565b5b815162000531848260208601620004bc565b91505092915050565b600060ff82169050919050565b62000552816200053a565b81146200055e57600080fd5b50565b600081519050620005728162000547565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b6200059f8162000578565b8114620005ab57600080fd5b50565b600081519050620005bf8162000594565b92915050565b620005d08162000323565b8114620005dc57600080fd5b50565b600081519050620005f081620005c5565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200062382620005f6565b9050919050565b620006358162000616565b81146200064157600080fd5b50565b60008151905062000655816200062a565b92915050565b600080600080600080600060e0888a0312156200067d576200067c620003b1565b5b600088015167ffffffffffffffff8111156200069e576200069d620003b6565b5b620006ac8a828b0162000507565b975050602088015167ffffffffffffffff811115620006d057620006cf620003b6565b5b620006de8a828b0162000507565b9650506040620006f18a828b0162000561565b9550506060620007048a828b01620005ae565b9450506080620007178a828b01620005df565b93505060a06200072a8a828b0162000644565b92505060c06200073d8a828b01620005df565b91505092959891949750929550565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200079f57607f821691505b602082108103620007b557620007b462000757565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b600060088302620008227fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620007e0565b6200082e8683620007e0565b95508019841693508086168417925050509392505050565b6000819050919050565b6000620008716200086b620008658462000323565b62000846565b62000323565b9050919050565b6000819050919050565b6200088d8362000850565b620008a56200089c8262000878565b848454620007f0565b825550505050565b600090565b620008bc620008ad565b620008c981848462000882565b505050565b5b81811015620008f157620008e5600082620008b2565b600181019050620008cf565b5050565b601f82111562000940576200090a81620007bb565b6200091584620007d0565b8101602085101562000925578190505b6200093d6200093485620007d0565b830182620008ce565b50505b505050565b60008160020a8304905092915050565b6000620009686000198460080262000945565b1980831691505092915050565b600062000983838362000955565b9150826002028217905092915050565b6200099e826200074c565b67ffffffffffffffff811115620009ba57620009b9620003d6565b5b620009c6825462000786565b620009d3828285620008f5565b600060209050601f83116001811462000a0b5760008415620009f6578287015190505b62000a02858262000975565b86555062000a72565b601f19841662000a1b86620007bb565b60005b8281101562000a455784890151825560018201915060208501945060208101905062000a1e565b8683101562000a65578489015162000a61601f89168262000955565b8355505b6001600288020188555050505b505050505050565b6000600282049050919050565b6000808291508390505b600185111562000ad95780860481111562000ab15762000ab06200032d565b5b600185161562000ac15780820291505b808102905062000ad18562000a7a565b945062000a91565b94509492505050565b60008262000af4576001905062000bc7565b8162000b04576000905062000bc7565b816001811462000b1d576002811462000b285762000b5e565b600191505062000bc7565b60ff84111562000b3d5762000b3c6200032d565b5b8360020a91508482111562000b575762000b566200032d565b5b5062000bc7565b5060208310610133831016604e8410600b841016171562000b985782820a90508381111562000b925762000b916200032d565b5b62000bc7565b62000ba7848484600162000a87565b9250905081840481111562000bc15762000bc06200032d565b5b81810290505b9392505050565b600062000bdb8262000323565b915062000be88362000323565b925062000c177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000ae2565b905092915050565b60805160a05160c05160e051612b5162000c9860003960008181610cc701528181610f170152611c0b0152600081816111b901528181611a820152611caa0152600081816111e501528181611ccb0152611d1001526000818161125801528181611290015281816113080152611a5e0152612b516000f3fe608060405234801561001057600080fd5b5060043610610286576000357c0100000000000000000000000000000000000000000000000000000000900480636ffa8a051161016e5780639da7d8ba116100e0578063e3ab207a116100a4578063e3ab207a14610847578063e54d63f714610877578063e8095295146108a7578063eda4e6d6146108c5578063f2fde38b146108e3578063f83da35d1461091357610286565b80639da7d8ba1461077b578063a9059cbb146107ab578063ab28cea0146107db578063b470aade146107f9578063c0ab70771461081757610286565b80638da5cb5b116101325780638da5cb5b146106b75780638f0b2d5d146106d55780638f1df6bc146106f15780638f770ad01461070f57806395d89b411461072d578063983b2d561461074b57610286565b80636ffa8a05146105eb57806370a082311461061b578063731f237c1461064b57806379ba5097146106695780638d34855a1461068757610286565b8063313ce5671161020757806351b4541c116101cb57806351b4541c146104ef578063573cc5071461051f57806358b2833b1461053d5780636721d4ef1461055b5780636787a9be1461058b5780636a2d094e146105bb57610286565b8063313ce5671461041157806340452d911461042f578063449a52f81461045f57806347a505171461048f5780634abfbba2146104bf57610286565b80631989c6a81161024e5780631989c6a814610345578063229ba1971461036357806323b872dd146103815780633092afd5146103b157806331333487146103e157610286565b806301ffc9a71461028b57806306fdde03146102bb578063095ea7b3146102d957806309f28f3c1461030957806318160ddd14610327575b600080fd5b6102a560048036038101906102a09190612277565b610943565b6040516102b291906122bf565b60405180910390f35b6102c3610ae9565b6040516102d0919061236a565b60405180910390f35b6102f360048036038101906102ee9190612420565b610b77565b60405161030091906122bf565b60405180910390f35b610311610c91565b60405161031e919061248b565b60405180910390f35b61032f610cb3565b60405161033c91906124b5565b60405180910390f35b61034d610cb9565b60405161035a91906124b5565b60405180910390f35b61036b610cc5565b60405161037891906124b5565b60405180910390f35b61039b600480360381019061039691906124d0565b610ce9565b6040516103a891906122bf565b60405180910390f35b6103cb60048036038101906103c69190612523565b610e09565b6040516103d891906122bf565b60405180910390f35b6103fb60048036038101906103f69190612550565b610efc565b60405161040891906124b5565b60405180910390f35b610419610fb0565b60405161042691906124b5565b60405180910390f35b61044960048036038101906104449190612590565b610fb6565b60405161045691906125d6565b60405180910390f35b61047960048036038101906104749190612420565b610fda565b60405161048691906122bf565b60405180910390f35b6104a960048036038101906104a49190612523565b61116c565b6040516104b691906124b5565b60405180910390f35b6104d960048036038101906104d49190612590565b6111b5565b6040516104e691906124b5565b60405180910390f35b61050960048036038101906105049190612590565b611215565b60405161051691906124b5565b60405180910390f35b610527611236565b60405161053491906124b5565b60405180910390f35b61054561123c565b60405161055291906124b5565b60405180910390f35b61057560048036038101906105709190612550565b611242565b60405161058291906124b5565b60405180910390f35b6105a560048036038101906105a09190612590565b6112c3565b6040516105b291906124b5565b60405180910390f35b6105d560048036038101906105d09190612590565b611343565b6040516105e291906124b5565b60405180910390f35b6106056004803603810190610600919061261d565b611364565b60405161061291906124b5565b60405180910390f35b61063560048036038101906106309190612523565b61139e565b60405161064291906124b5565b60405180910390f35b610653611456565b60405161066091906122bf565b60405180910390f35b610671611467565b60405161067e91906122bf565b60405180910390f35b6106a1600480360381019061069c919061261d565b61160e565b6040516106ae91906124b5565b60405180910390f35b6106bf61163c565b6040516106cc9190612659565b60405180910390f35b6106ef60048036038101906106ea9190612523565b611662565b005b6106f9611700565b60405161070691906122bf565b60405180910390f35b610717611849565b60405161072491906124b5565b60405180910390f35b61073561184f565b604051610742919061236a565b60405180910390f35b61076560048036038101906107609190612523565b6118dd565b60405161077291906122bf565b60405180910390f35b6107956004803603810190610790919061261d565b61199a565b6040516107a291906124b5565b60405180910390f35b6107c560048036038101906107c09190612420565b6119c6565b6040516107d291906122bf565b60405180910390f35b6107e3611a5c565b6040516107f091906124b5565b60405180910390f35b610801611a80565b60405161080e91906124b5565b60405180910390f35b610831600480360381019061082c9190612590565b611aa4565b60405161083e91906122bf565b60405180910390f35b610861600480360381019061085c919061261d565b611bdc565b60405161086e91906124b5565b60405180910390f35b610891600480360381019061088c9190612550565b611bf0565b60405161089e91906124b5565b60405180910390f35b6108af611ca4565b6040516108bc919061248b565b60405180910390f35b6108cd611d0e565b6040516108da91906124b5565b60405180910390f35b6108fd60048036038101906108f89190612523565b611d32565b60405161090a91906122bf565b60405180910390f35b61092d60048036038101906109289190612674565b611dd4565b60405161093a91906125d6565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036109975760019050610ae4565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036109e95760019050610ae4565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610a3b5760019050610ae4565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610a8d5760019050610ae4565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610adf5760019050610ae4565b600090505b919050565b60068054610af69061270a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b229061270a565b8015610b6f5780601f10610b4457610100808354040283529160200191610b6f565b820191906000526020600020905b815481529060010190602001808311610b5257829003601f168201915b505050505081565b600080610b82611700565b50610b8c836112c3565b905080600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c1a919061276a565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610c7e91906124b5565b60405180910390a3600191505092915050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b60095481565b60008080549050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000610cf6611700565b50610d00846112c3565b915081600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610d8b57600080fd5b610d96868684611e41565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610df591906124b5565b60405180910390a380925050509392505050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610e9257503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b610e9b57600080fd5b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600080600064e8d4a5100091506a52b7d2dcc80cd2e40000007f0000000000000000000000000000000000000000000000000000000000000000610f4091906127cd565b905060005b84811015610f895764e8d4a510008284610f5f91906127fe565b610f6991906127cd565b83610f749190612840565b92508080610f8190612874565b915050610f45565b5064e8d4a510008583610f9c91906127fe565b610fa691906127cd565b9250505092915050565b60085481565b60008181548110610fc657600080fd5b906000526020600020016000915090505481565b600080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611069576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106090612908565b60405180910390fd5b600a546009548461107a919061276a565b11156110bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b290612974565b60405180910390fd5b6110c3611700565b506110cd836112c3565b905082600960008282546110e1919061276a565b925050819055506110f28482611e66565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161115091906124b5565b60405180910390a3611160611f2a565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f0000000000000000000000000000000000000000000000000000000000000000826111e391906127fe565b7f000000000000000000000000000000000000000000000000000000000000000061120e919061276a565b9050919050565b6000603c82426112259190612840565b61122f91906127cd565b9050919050565b600b5481565b60035481565b6000806402540be4008361125691906127fe565b7f00000000000000000000000000000000000000000000000000000000000000006112819190612840565b8461128c91906127fe565b90507f0000000000000000000000000000000000000000000000000000000000000000816112ba91906127cd565b91505092915050565b60006402540be400600260009054906101000a90046fffffffffffffffffffffffffffffffff166112f49190612994565b6fffffffffffffffffffffffffffffffff167f00000000000000000000000000000000000000000000000000000000000000008361133291906127fe565b61133c91906127cd565b9050919050565b6000603c82426113539190612840565b61135d91906127cd565b9050919050565b6000606860ff167affffffffffffffffffffffffffff00000000000000000000000000836001900416908060020a82049150509050919050565b6000806000806113ad8561116c565b92506113ba600354611215565b90506114066402540be400600260009054906101000a90046fffffffffffffffffffffffffffffffff166113ee9190612994565b6fffffffffffffffffffffffffffffffff1682610efc565b6fffffffffffffffffffffffffffffffff16915064e8d4a510006a52b7d2dcc80cd2e400000061143691906127fe565b828461144291906127fe565b61144c91906127cd565b9350505050919050565b60006114626000611aa4565b905090565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114c457600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b600080600061161c8461199a565b915061162784611364565b90506116338282611242565b92505050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146116bc57600080fd5b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000806000806000806000806000611716611456565b5061171f611fcc565b97506000600102880361173d57600098505050505050505050611846565b61174688611bdc565b9550600186611755919061276a565b9050611760866111b5565b9150600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16945061179e82611343565b925060008311156117ba576117b38584611bf0565b93506117be565b8493505b6117cd60008560095484611dd4565b96506000879080600181540180825580915050600190039060005260206000200160009091909190915055611801876120c7565b507f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d6758160405161183191906124b5565b60405180910390a16001985050505050505050505b90565b600a5481565b6007805461185c9061270a565b80601f01602080910402602001604051908101604052809291908181526020018280546118889061270a565b80156118d55780601f106118aa576101008083540402835291602001916118d5565b820191906000526020600020905b8154815290600101906020018083116118b857829003601f168201915b505050505081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461193957600080fd5b6001600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000602060ff166cffffffffffffffffff00000000836001900416908060020a82049150509050919050565b60008060006119d3611700565b506119dd846112c3565b91506119ea338684611e41565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051611a4991906124b5565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000611ab4600354611215565b915060008203611ac957600092505050611bd7565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169050600084118015611b0b57508184105b15611b14578391505b611b1e8183610efc565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550603c82611b6391906127fe565b600354611b70919061276a565b60038190555080826003547fa0717e54e02bd9829db5e6e998aec0ae9de796b8d150a3cc46a92ab869697755600260009054906101000a90046fffffffffffffffffffffffffffffffff16604051611bc89190612a0c565b60405180910390a46001925050505b919050565b600063ffffffff8260019004169050919050565b600080600064e8d4a5100091506a52b7d2dcc80cd2e40000007f0000000000000000000000000000000000000000000000000000000000000000611c3491906127cd565b905060005b84811015611c7d5764e8d4a510008284611c5391906127fe565b611c5d91906127cd565b83611c68919061276a565b92508080611c7590612874565b915050611c39565b5064e8d4a510008583611c9091906127fe565b611c9a91906127cd565b9250505092915050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042611cf59190612840565b611cff91906127cd565b611d09919061276a565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d8e57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000807affffffffffffffffffffffffffff00000000000000000000000000606860ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b600080611e4e8584612113565b50611e598484611e66565b5060019150509392505050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008503611ec25760009350505050611f24565b611ecb8661116c565b92508483611ed9919061276a565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000806000600954905060006001600080549050611f489190612840565b81548110611f5957611f58612a27565b5b90600052602060002001546001900491506cffffffffffffffffff000000001982169150602060ff16819060020a02821791508160010260006001600080549050611fa49190612840565b81548110611fb557611fb4612a27565b5b906000526020600020018190555060019250505090565b6000806000806001600080549050611fe49190612840565b81548110611ff557611ff4612a27565b5b906000526020600020015491503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381865afa158015612069573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208d9190612a82565b6fffffffffffffffffffffffffffffffff1690506120aa82611bdc565b81116120be576000600102925050506120c4565b81925050505b90565b6000806120d38361160e565b9050612109600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612104836112c3565b611e66565b5080915050919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000850361216f5760009350505050612214565b6121788661116c565b9250848310156121bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121b490612afb565b60405180910390fd5b84836121c99190612840565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6122548161221f565b811461225f57600080fd5b50565b6000813590506122718161224b565b92915050565b60006020828403121561228d5761228c61221a565b5b600061229b84828501612262565b91505092915050565b60008115159050919050565b6122b9816122a4565b82525050565b60006020820190506122d460008301846122b0565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156123145780820151818401526020810190506122f9565b60008484015250505050565b6000601f19601f8301169050919050565b600061233c826122da565b61234681856122e5565b93506123568185602086016122f6565b61235f81612320565b840191505092915050565b600060208201905081810360008301526123848184612331565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123b78261238c565b9050919050565b6123c7816123ac565b81146123d257600080fd5b50565b6000813590506123e4816123be565b92915050565b6000819050919050565b6123fd816123ea565b811461240857600080fd5b50565b60008135905061241a816123f4565b92915050565b600080604083850312156124375761243661221a565b5b6000612445858286016123d5565b92505060206124568582860161240b565b9150509250929050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61248581612460565b82525050565b60006020820190506124a0600083018461247c565b92915050565b6124af816123ea565b82525050565b60006020820190506124ca60008301846124a6565b92915050565b6000806000606084860312156124e9576124e861221a565b5b60006124f7868287016123d5565b9350506020612508868287016123d5565b92505060406125198682870161240b565b9150509250925092565b6000602082840312156125395761253861221a565b5b6000612547848285016123d5565b91505092915050565b600080604083850312156125675761256661221a565b5b60006125758582860161240b565b92505060206125868582860161240b565b9150509250929050565b6000602082840312156125a6576125a561221a565b5b60006125b48482850161240b565b91505092915050565b6000819050919050565b6125d0816125bd565b82525050565b60006020820190506125eb60008301846125c7565b92915050565b6125fa816125bd565b811461260557600080fd5b50565b600081359050612617816125f1565b92915050565b6000602082840312156126335761263261221a565b5b600061264184828501612608565b91505092915050565b612653816123ac565b82525050565b600060208201905061266e600083018461264a565b92915050565b6000806000806080858703121561268e5761268d61221a565b5b600061269c8782880161240b565b94505060206126ad8782880161240b565b93505060406126be8782880161240b565b92505060606126cf8782880161240b565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061272257607f821691505b602082108103612735576127346126db565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612775826123ea565b9150612780836123ea565b92508282019050808211156127985761279761273b565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006127d8826123ea565b91506127e3836123ea565b9250826127f3576127f261279e565b5b828204905092915050565b6000612809826123ea565b9150612814836123ea565b9250828202612822816123ea565b915082820484148315176128395761283861273b565b5b5092915050565b600061284b826123ea565b9150612856836123ea565b925082820390508181111561286e5761286d61273b565b5b92915050565b600061287f826123ea565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036128b1576128b061273b565b5b600182019050919050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b60006128f2600a836122e5565b91506128fd826128bc565b602082019050919050565b60006020820190508181036000830152612921816128e5565b9050919050565b7f4552525f43415000000000000000000000000000000000000000000000000000600082015250565b600061295e6007836122e5565b915061296982612928565b602082019050919050565b6000602082019050818103600083015261298d81612951565b9050919050565b600061299f82612460565b91506129aa83612460565b92508282026129b881612460565b91508082146129ca576129c961273b565b5b5092915050565b6000819050919050565b60006129f66129f16129ec84612460565b6129d1565b6123ea565b9050919050565b612a06816129db565b82525050565b6000602082019050612a2160008301846129fd565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b612a5f81612460565b8114612a6a57600080fd5b50565b600081519050612a7c81612a56565b92915050565b600060208284031215612a9857612a9761221a565b5b6000612aa684828501612a6d565b91505092915050565b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b6000612ae5600d836122e5565b9150612af082612aaf565b602082019050919050565b60006020820190508181036000830152612b1481612ad8565b905091905056fea26469706673582212205a3fc58caf4d1c522f4f61ec2bbe096063676ac1ce8fe3918ede741dfb777b8164736f6c63430008110033 \ No newline at end of file diff --git a/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.json b/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.json deleted file mode 100644 index 9c46b36..0000000 --- a/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.json +++ /dev/null @@ -1 +0,0 @@ -[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint128","name":"_taxLevelMinute","type":"uint128"},{"internalType":"uint256","name":"_periodMinutes","type":"uint256"},{"internalType":"address","name":"_defaultSinkAddress","type":"address"},{"internalType":"uint256","name":"_supplyCap","type":"uint256"}],"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":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":"uint256","name":"_oldAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newAmount","type":"uint256"}],"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":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rounds","type":"uint256"}],"name":"applyDemurrageLimited","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"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":[],"name":"demurrageAmount","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"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":"uint256","name":"_demurrageAmount","type":"uint256"}],"name":"getDistribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_redistribution","type":"bytes32"}],"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":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"growBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumParticipantSpend","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":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resolutionFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sinkAddress","type":"address"}],"name":"setSinkAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supplyCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"redistribution","type":"bytes32"}],"name":"toRedistributionDemurrageModifier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"redistribution","type":"bytes32"}],"name":"toRedistributionPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"redistribution","type":"bytes32"}],"name":"toRedistributionSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","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/unittest/base.py b/python/erc20_demurrage_token/unittest/base.py index 6614f12..1b9694b 100644 --- a/python/erc20_demurrage_token/unittest/base.py +++ b/python/erc20_demurrage_token/unittest/base.py @@ -95,13 +95,6 @@ class TestDemurrage(EthTesterCase): def setUp(self): super(TestDemurrage, self).setUp() -# token_deploy = TestTokenDeploy() -# self.settings = token_deploy.settings -# self.sink_address = token_deploy.sink_address -# self.start_block = token_deploy.start_block -# self.start_time = token_deploy.start_time -# self.default_supply = self.default_supply -# self.default_supply_cap = self.default_supply_cap period = PERIOD try: period = getattr(self, 'period') diff --git a/python/setup.cfg b/python/setup.cfg index dd9ec7d..523be5c 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = erc20-demurrage-token -version = 0.1.1 +version = 0.1.2 description = ERC20 token with redistributed continual demurrage author = Louis Holbrook author_email = dev@holbrook.no diff --git a/python/tests/test_burn.py b/python/tests/test_burn.py index 587d86d..94b1d58 100644 --- a/python/tests/test_burn.py +++ b/python/tests/test_burn.py @@ -33,7 +33,6 @@ class TestBurn(TestDemurrage): super(TestBurn, self).setUp() - # tax_level = ppm def deploy(self, tax_level=None): nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) @@ -51,7 +50,8 @@ class TestBurn(TestDemurrage): logg.info('deployed with mode {}'.format(self.mode)) - + + # Burn tokens and immediately check balances and supply def test_burn_basic(self): self.deploy() nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) @@ -92,6 +92,7 @@ class TestBurn(TestDemurrage): self.assertEqual(burned, 600000) + # burn tokens and check sink balance and supply after first redistribution period def test_burned_redistribution(self): self.deploy() nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) @@ -149,7 +150,7 @@ class TestBurn(TestDemurrage): self.assert_within_lower(bal, 500000000, 0.0025) - + # burn tokens and check sink and taxed balance and supply after first redistribution period def test_burned_other_redistribution(self): self.deploy() nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) @@ -218,6 +219,7 @@ class TestBurn(TestDemurrage): self.assert_within_lower(sink_bal, bal, 0.09) # TODO is this ok variance, 1.0 is ppm? + # verify expected results of balance and supply after multiple redistribution periods def test_burn_accumulate(self): self.deploy(tax_level=2/1000) nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) diff --git a/python/tests/test_demurrage.py b/python/tests/test_demurrage.py index cb022be..7ecb23d 100644 --- a/python/tests/test_demurrage.py +++ b/python/tests/test_demurrage.py @@ -40,6 +40,7 @@ class TestDemurragePeriods(TestDemurrage): logg.info('deployed with mode {}'.format(self.mode)) + # verify that tax level calculation is in ppm as expected def test_ppm(self): nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) @@ -72,6 +73,7 @@ class TestDemurragePeriods(TestDemurrage): + # verify balances and supply after multiple demurrage periods def test_over_time(self): nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) diff --git a/solidity/DemurrageTokenSingleNocap.sol b/solidity/DemurrageTokenSingleNocap.sol index 5ea00c7..779e77d 100644 --- a/solidity/DemurrageTokenSingleNocap.sol +++ b/solidity/DemurrageTokenSingleNocap.sol @@ -355,16 +355,15 @@ contract DemurrageTokenSingleCap { } // 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) { bytes32 currentRedistribution; bytes32 nextRedistribution; uint256 currentPeriod; - //uint256 currentDemurrageAmount; uint256 lastDemurrageAmount; bytes32 lastRedistribution; uint256 nextRedistributionDemurrage; uint256 demurrageCounts; - //uint256 periodTimestamp; uint256 nextPeriod; applyDemurrage(); @@ -373,23 +372,14 @@ contract DemurrageTokenSingleCap { return false; } + // calculate the decay from previous redistributino lastRedistribution = redistributions[lastPeriod]; currentPeriod = toRedistributionPeriod(currentRedistribution); nextPeriod = currentPeriod + 1; - //periodTimestamp = getPeriodTimeDelta(currentPeriod); - - //currentDemurrageAmount = demurrageAmount; - - //demurrageCounts = demurrageCycles(periodTimestamp); - //if (demurrageCounts > 0) { - // nextRedistributionDemurrage = growBy(currentDemurrageAmount, demurrageCounts); - //} else { - // nextRedistributionDemurrage = currentDemurrageAmount; - //} lastDemurrageAmount = toRedistributionDemurrageModifier(lastRedistribution); demurrageCounts = periodDuration / 60; nextRedistributionDemurrage = decayBy(lastDemurrageAmount, demurrageCounts); - + nextRedistribution = toRedistribution(0, nextRedistributionDemurrage, totalSupply(), nextPeriod); redistributions.push(nextRedistribution); @@ -499,6 +489,7 @@ contract DemurrageTokenSingleCap { } // Explicitly and irretrievably burn tokens + // Only token minters can burn tokens function burn(uint256 _value) public { require(minter[msg.sender]); require(_value <= account[msg.sender]); diff --git a/solidity/Makefile b/solidity/Makefile index b2f4bbc..15cf4e4 100644 --- a/solidity/Makefile +++ b/solidity/Makefile @@ -33,6 +33,10 @@ test: all python ../python/tests/test_pure.py install: all + #cp -v DemurrageToken*.{json,bin} ../python/erc20_demurrage_token/data/ + cp -v DemurrageTokenSingleNocap.{json,bin} ../python/erc20_demurrage_token/data/ + +install-broken: all cp -v DemurrageToken*.{json,bin} ../python/erc20_demurrage_token/data/ .PHONY: test install