erc20-demurrage-token

ERC20 token with redistributed continual demurrage
Log | Files | Refs | README

commit e6eef4880876602e836f003598249513892ab7c3
parent 335373340520c5ccb81c145c25dede8d84dd5e36
Author: lash <dev@holbrook.no>
Date:   Fri, 10 Feb 2023 15:58:31 +0000

Add supply cap

Diffstat:
Mpython/erc20_demurrage_token/data/DemurrageTokenSingleNocap.bin | 4++--
Mpython/erc20_demurrage_token/data/DemurrageTokenSingleNocap.json | 2+-
Mpython/erc20_demurrage_token/token.py | 50+++++++++++++++++---------------------------------
Mpython/erc20_demurrage_token/unittest/base.py | 14+++++++-------
Mpython/run_tests.sh | 1+
Mpython/tests/test_cap.py | 31+++++++++++++++----------------
Mpython/tests/test_seal.py | 31+++++++++++++++++++++++++++++++
Msolidity/DemurrageTokenSingleNocap.sol | 26+++++++++++++++++++++++---
8 files changed, 97 insertions(+), 62 deletions(-)

diff --git a/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.bin b/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.bin @@ -1 +1 @@ -60c06040523480156200001157600080fd5b5060405162005f9b38038062005f9b833981810160405281019062000037919062000909565b6801000000000000000083600f0b126200005057600080fd5b6200005a6200061e565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600e6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550866006908162000126919062000c2a565b50856007908162000138919062000c2a565b508460ff166008819055504260038190555060035460808181525050603c8362000163919062000d40565b60a081815250506200018a60016200034f6401000000000262002be3176401000000009004565b600260006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550620001e484620003766401000000000262002c09176401000000009004565b600d60006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff1602179055506200024e6000600260009054906101000a9004600f0b60006001620003ca640100000000026401000000009004565b90506000819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550505081601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000d8b565b6000677fffffffffffffff8211156200036757600080fd5b6040829060020a029050919050565b60008082600f0b136200038857600080fd5b60806fb17217f7d1cf79abc9e3b39803f2f6af620003b5846200044e640100000000026401000000009004565b600f0b02908060020a82049150509050919050565b620003d46200061e565b620003de6200061e565b82816000019063ffffffff16908163ffffffff168152505083816020019068ffffffffffffffffff16908168ffffffffffffffffff168152505067ffffffffffffffff8516816040019067ffffffffffffffff16908167ffffffffffffffff168152505080915050949350505050565b60008082600f0b136200046057600080fd5b60008083600f0b90506801000000000000000081126200049c576040819060008212600003808260020a82851804189250505090506040820191505b6401000000008112620004cb576020819060008212600003808260020a82851804189250505090506020820191505b620100008112620004f8576010819060008212600003808260020a82851804189250505090506010820191505b610100811262000524576008819060008212600003808260020a82851804189250505090506008820191505b601081126200054f576004819060008212600003808260020a82851804189250505090506004820191505b600481126200057a576002819060008212600003808260020a82851804189250505090506002820191505b600281126200058a576001820191505b600060408084039060020a029050600083607f0386600f0b9060020a029050600067800000000000000090505b600081131562000611578182029150600060ff83908060020a8204915050905080607f0183908060020a8204915050925080820284019350506001819060008212600003808260020a8285180418925050509050620005b7565b5081945050505050919050565b6040518060600160405280600063ffffffff168152602001600068ffffffffffffffffff168152602001600067ffffffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620006c38262000678565b810181811067ffffffffffffffff82111715620006e557620006e462000689565b5b80604052505050565b6000620006fa6200065a565b9050620007088282620006b8565b919050565b600067ffffffffffffffff8211156200072b576200072a62000689565b5b620007368262000678565b9050602081019050919050565b60005b838110156200076357808201518184015260208101905062000746565b60008484015250505050565b60006200078662000780846200070d565b620006ee565b905082815260208101848484011115620007a557620007a462000673565b5b620007b284828562000743565b509392505050565b600082601f830112620007d257620007d16200066e565b5b8151620007e48482602086016200076f565b91505092915050565b600060ff82169050919050565b6200080581620007ed565b81146200081157600080fd5b50565b6000815190506200082581620007fa565b92915050565b600081600f0b9050919050565b62000843816200082b565b81146200084f57600080fd5b50565b600081519050620008638162000838565b92915050565b6000819050919050565b6200087e8162000869565b81146200088a57600080fd5b50565b6000815190506200089e8162000873565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620008d182620008a4565b9050919050565b620008e381620008c4565b8114620008ef57600080fd5b50565b6000815190506200090381620008d8565b92915050565b60008060008060008060c0878903121562000929576200092862000664565b5b600087015167ffffffffffffffff8111156200094a576200094962000669565b5b6200095889828a01620007ba565b965050602087015167ffffffffffffffff8111156200097c576200097b62000669565b5b6200098a89828a01620007ba565b95505060406200099d89828a0162000814565b9450506060620009b089828a0162000852565b9350506080620009c389828a016200088d565b92505060a0620009d689828a01620008f2565b9150509295509295509295565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062000a3657607f821691505b60208210810362000a4c5762000a4b620009ee565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b60006008830262000ab97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000a77565b62000ac5868362000a77565b95508019841693508086168417925050509392505050565b6000819050919050565b600062000b0862000b0262000afc8462000869565b62000add565b62000869565b9050919050565b6000819050919050565b62000b248362000ae7565b62000b3c62000b338262000b0f565b84845462000a87565b825550505050565b600090565b62000b5362000b44565b62000b6081848462000b19565b505050565b5b8181101562000b885762000b7c60008262000b49565b60018101905062000b66565b5050565b601f82111562000bd75762000ba18162000a52565b62000bac8462000a67565b8101602085101562000bbc578190505b62000bd462000bcb8562000a67565b83018262000b65565b50505b505050565b60008160020a8304905092915050565b600062000bff6000198460080262000bdc565b1980831691505092915050565b600062000c1a838362000bec565b9150826002028217905092915050565b62000c3582620009e3565b67ffffffffffffffff81111562000c515762000c5062000689565b5b62000c5d825462000a1d565b62000c6a82828562000b8c565b600060209050601f83116001811462000ca2576000841562000c8d578287015190505b62000c99858262000c0c565b86555062000d09565b601f19841662000cb28662000a52565b60005b8281101562000cdc5784890151825560018201915060208501945060208101905062000cb5565b8683101562000cfc578489015162000cf8601f89168262000bec565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000d4d8262000869565b915062000d5a8362000869565b925082820262000d6a8162000869565b9150828204841483151762000d845762000d8362000d11565b5b5092915050565b60805160a0516151b962000de260003960008181611a640152818161218a0152818161278c015281816129b70152612ab9015260008181611a90015281816129e301528181612ada0152612b1f01526151b96000f3fe608060405234801561001057600080fd5b506004361061037a576000357c0100000000000000000000000000000000000000000000000000000000900480636787a9be116101f0578063983b2d5611610121578063d7a52fa9116100bf578063e69571af11610099578063e69571af14610b49578063e809529514610b79578063eda4e6d614610b97578063f2fde38b14610bb55761037a565b8063d7a52fa914610adf578063d89135cd14610afb578063e54063a614610b195761037a565b8063b1cb0db3116100fb578063b1cb0db314610a55578063b470aade14610a73578063c0ab707714610a91578063d340ef8a14610ac15761037a565b8063983b2d56146109c5578063a457c2d7146109f5578063a9059cbb14610a255761037a565b806379ba50971161018e5780638da5cb5b116101685780638da5cb5b1461094f5780638f0b2d5d1461096d5780638f1df6bc1461098957806395d89b41146109a75761037a565b806379ba5097146108e357806384dde4af1461090157806386fe212d1461091f5761037a565b8063731f237c116101ca578063731f237c1461085957806373f42561146108775780637445e33a1461089557806374bedb95146108c55761037a565b80636787a9be146107c95780636a2d094e146107f957806370a08231146108295761037a565b80632c1758c1116102ca57806342966c68116102685780634abfbba2116102425780634abfbba21461072d57806351b4541c1461075d57806358b2833b1461078d5780635f408c04146107ab5761037a565b806342966c68146106b1578063449a52f8146106cd57806347a50517146106fd5761037a565b8063313ce567116102a4578063313ce5671461061357806331a5995d14610631578063395093511461064f57806340452d911461067f5761037a565b80632c1758c1146105835780633092afd5146105b357806331333487146105e35761037a565b806318cbbcfc11610337578063229ba19711610311578063229ba197146104d557806323a85944146104f357806323b872dd146105235780632a7aec09146105535761037a565b806318cbbcfc146104695780631989c6a814610487578063213d1e1e146104a55761037a565b806301ffc9a71461037f57806306fdde03146103af578063095ea7b3146103cd57806309f28f3c146103fd57806311c566151461041b57806318160ddd1461044b575b600080fd5b6103996004803603810190610394919061456d565b610be5565b6040516103a691906145b5565b60405180910390f35b6103b7610d8b565b6040516103c49190614660565b60405180910390f35b6103e760048036038101906103e29190614716565b610e19565b6040516103f491906145b5565b60405180910390f35b610405611055565b6040516104129190614772565b60405180910390f35b610435600480360381019061043091906147b9565b611068565b6040516104429190614808565b60405180910390f35b6104536110b8565b6040516104609190614808565b60405180910390f35b6104716110cf565b60405161047e9190614808565b60405180910390f35b61048f6110d4565b60405161049c9190614808565b60405180910390f35b6104bf60048036038101906104ba91906149c4565b6110e0565b6040516104cc9190614808565b60405180910390f35b6104dd6110f9565b6040516104ea9190614772565b60405180910390f35b61050d600480360381019061050891906149c4565b61110c565b60405161051a91906145b5565b60405180910390f35b61053d600480360381019061053891906149f1565b611174565b60405161054a91906145b5565b60405180910390f35b61056d600480360381019061056891906149c4565b611392565b60405161057a9190614772565b60405180910390f35b61059d60048036038101906105989190614a44565b6113ca565b6040516105aa91906145b5565b60405180910390f35b6105cd60048036038101906105c89190614a71565b6113fd565b6040516105da91906145b5565b60405180910390f35b6105fd60048036038101906105f89190614a9e565b611507565b60405161060a9190614808565b60405180910390f35b61061b611573565b6040516106289190614808565b60405180910390f35b610639611579565b6040516106469190614808565b60405180910390f35b61066960048036038101906106649190614716565b61157f565b60405161067691906145b5565b60405180910390f35b61069960048036038101906106949190614a44565b611715565b6040516106a893929190614b0b565b60405180910390f35b6106cb60048036038101906106c69190614a44565b611784565b005b6106e760048036038101906106e29190614716565b6118c0565b6040516106f491906145b5565b60405180910390f35b61071760048036038101906107129190614a71565b611a17565b6040516107249190614808565b60405180910390f35b61074760048036038101906107429190614a44565b611a60565b6040516107549190614808565b60405180910390f35b61077760048036038101906107729190614a44565b611ac0565b6040516107849190614808565b60405180910390f35b610795611ae1565b6040516107a29190614808565b60405180910390f35b6107b3611ae7565b6040516107c09190614b5e565b60405180910390f35b6107e360048036038101906107de9190614a44565b611bb4565b6040516107f09190614808565b60405180910390f35b610813600480360381019061080e9190614a44565b611bf5565b6040516108209190614808565b60405180910390f35b610843600480360381019061083e9190614a71565b611c16565b6040516108509190614808565b60405180910390f35b610861611c80565b60405161086e9190614808565b60405180910390f35b61087f611c91565b60405161088c9190614808565b60405180910390f35b6108af60048036038101906108aa91906149c4565b611c97565b6040516108bc9190614808565b60405180910390f35b6108cd611cc5565b6040516108da9190614808565b60405180910390f35b6108eb611ccb565b6040516108f891906145b5565b60405180910390f35b610909611e72565b6040516109169190614b88565b60405180910390f35b61093960048036038101906109349190614a44565b611e98565b6040516109469190614808565b60405180910390f35b610957611f77565b6040516109649190614b88565b60405180910390f35b61098760048036038101906109829190614a71565b611f9d565b005b610991612052565b60405161099e91906145b5565b60405180910390f35b6109af612302565b6040516109bc9190614660565b60405180910390f35b6109df60048036038101906109da9190614a71565b612390565b6040516109ec91906145b5565b60405180910390f35b610a0f6004803603810190610a0a9190614716565b612464565b604051610a1c91906145b5565b60405180910390f35b610a3f6004803603810190610a3a9190614716565b612683565b604051610a4c91906145b5565b60405180910390f35b610a5d612784565b604051610a6a9190614808565b60405180910390f35b610a7b61278a565b604051610a889190614808565b60405180910390f35b610aab6004803603810190610aa69190614a44565b6127ae565b604051610ab89190614808565b60405180910390f35b610ac9612924565b604051610ad69190614808565b60405180910390f35b610af96004803603810190610af49190614a44565b61292a565b005b610b03612a15565b604051610b109190614808565b60405180910390f35b610b336004803603810190610b2e91906149c4565b612a1f565b604051610b409190614808565b60405180910390f35b610b636004803603810190610b5e9190614ba3565b612a33565b604051610b709190614c79565b60405180910390f35b610b81612ab3565b604051610b8e9190614cbf565b60405180910390f35b610b9f612b1d565b604051610bac9190614808565b60405180910390f35b610bcf6004803603810190610bca9190614a71565b612b41565b604051610bdc91906145b5565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610c395760019050610d86565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610c8b5760019050610d86565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610cdd5760019050610d86565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610d2f5760019050610d86565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610d815760019050610d86565b600090505b919050565b60068054610d9890614d09565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc490614d09565b8015610e115780601f10610de657610100808354040283529160200191610e11565b820191906000526020600020905b815481529060010190602001808311610df457829003601f168201915b505050505081565b6000806000610e26611ae7565b905060028160ff1603610e3e5760009250505061104f565b60008160ff161115610e85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7c90614d86565b60405180910390fd5b6000600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115610f4e5760008414610f4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4490614df2565b60405180910390fd5b5b610f56612052565b50610f6084611bb4565b915081600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925866040516110409190614808565b60405180910390a36001925050505b92915050565b600260009054906101000a9004600f0b81565b60008061108f61107785612be3565b61108a6110846001612be3565b86612c4b565b612cb2565b905061109a81612d31565b67ffffffffffffffff16846110af9190614e41565b91505092915050565b6000600c546009546110ca9190614e41565b905090565b600f81565b60008080549050905090565b6000816020015168ffffffffffffffffff169050919050565b600d60009054906101000a9004600f0b81565b600080826000015163ffffffff161115611129576000905061116f565b6000826020015168ffffffffffffffffff16111561114a576000905061116f565b6000826040015167ffffffffffffffff16111561116a576000905061116f565b600190505b919050565b600080600080611182611ae7565b905060028160ff160361119b576000935050505061138b565b60008160ff1611156111e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d990614d86565b60405180910390fd5b6111ea612052565b506111f485611bb4565b925082600f60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561127f57600080fd5b82600f60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461130b9190614e41565b9250508190555061131d878785612d66565b91508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8760405161137c9190614808565b60405180910390a38193505050505b9392505050565b60008067ffffffffffffffff836040015160070b169050600081600f0b036113c1576113be6001612be3565b90505b80915050919050565b6000600f82106113d957600080fd5b600082036113ee57600f6013541490506113f8565b8160135483161490505b919050565b600061140c600160ff166113ca565b1561141657600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061149d57503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b6114a657600080fd5b6000600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b60008060008061151686612be3565b925061152185612be3565b915061153c600d60009054906101000a9004600f0b83612cb2565b905061154781612d8b565b90506115538382612cb2565b905061155e81612d31565b67ffffffffffffffff16935050505092915050565b60085481565b60135481565b60008061158a612052565b5061159483611bb4565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546116229190614e75565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040516117029190614808565b60405180910390a3600191505092915050565b6000818154811061172557600080fd5b906000526020600020016000915090508060000160009054906101000a900463ffffffff16908060000160049054906101000a900468ffffffffffffffffff169080600001600d9054906101000a900467ffffffffffffffff16905083565b600061178e611ae7565b60ff161461179b57600080fd5b600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166117f157600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481111561183d57600080fd5b600061184882611bb4565b90506118543382612e18565b5081600c60008282546118679190614e75565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040516118b49190614808565b60405180910390a25050565b60008060006118cd611ae7565b60ff16146118da57600080fd5b600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611966576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195d90614ef5565b60405180910390fd5b61196e612052565b5061197883611bb4565b9050826009600082825461198c9190614e75565b9250508190555061199d8482612f1f565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516119fb9190614808565b60405180910390a3611a0b612fe3565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f000000000000000000000000000000000000000000000000000000000000000082611a8e9190614f15565b7f0000000000000000000000000000000000000000000000000000000000000000611ab99190614e75565b9050919050565b6000603c8242611ad09190614e41565b611ada9190614f86565b9050919050565b60035481565b6000601260009054906101000a900460ff1615611b075760019050611bb1565b600060115403611b1a5760009050611bb1565b6011544210611bac57611b47603c600354611b359190614f86565b601154611b429190614e41565b6127ae565b506001601260006101000a81548160ff0219169083151502179055507ff80dbaea4785589e52984ca36a31de106adc77759539a5c7d92883bf49692fe942604051611b929190614808565b60405180910390a1611ba2612052565b5060029050611bb1565b600090505b90565b600080611bd8611bc384612be3565b600260009054906101000a9004600f0b6131a7565b9050611be381612d31565b67ffffffffffffffff16915050919050565b6000603c8242611c059190614e41565b611c0f9190614f86565b9050919050565b6000806000806000611c2f611c2a87611a17565b612be3565b9350611c3c600354611ac0565b9150611c5784600260009054906101000a9004600f0b612cb2565b9250611c75611c6584612d31565b67ffffffffffffffff1683611507565b945050505050919050565b6000611c8c60006127ae565b905090565b600c5481565b6000806000611ca5846110e0565b9150611cb084611392565b9050611cbc8282611068565b92505050919050565b600b5481565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d2857600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060108210611edd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed490615003565b60405180910390fd5b6000601354831614611f24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f1b9061506f565b60405180910390fd5b816013600082825417925050819055507fdd5e7cad9599c1dcaa8d5adcd88f157fc5fada62511c0d3edb1bfd3b778acc41601354604051611f659190614808565b60405180910390a16013549050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611faa600260ff166113ca565b15611fb457600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461200e57600080fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600061205c6144ca565b6120646144ca565b61206c6144ca565b600080600080600061207c611c80565b50612085613233565b97506120908861110c565b156120a6576000985050505050505050506122ff565b6000600a54815481106120bc576120bb61508f565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681525050955061216988612a1f565b94506001856121789190614e75565b905061218386611392565b9350603c857f00000000000000000000000000000000000000000000000000000000000000006121b39190614f15565b6121bd9190614f86565b91506121e86121e3600d60009054906101000a9004600f0b6121de85612be3565b612cb2565b612d8b565b92506121fe6000846121f86110b8565b84612a33565b96506000879080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050506122ba876133c9565b507f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d675816040516122ea9190614808565b60405180910390a16001985050505050505050505b90565b6007805461230f90614d09565b80601f016020809104026020016040519081016040528092919081815260200182805461233b90614d09565b80156123885780601f1061235d57610100808354040283529160200191612388565b820191906000526020600020905b81548152906001019060200180831161236b57829003601f168201915b505050505081565b600061239f600160ff166113ca565b156123a957600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461240357600080fd5b6001600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b60008061247083611bb4565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156124fb57600080fd5b612503612052565b5080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546125909190614e41565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040516126709190614808565b60405180910390a3600191505092915050565b600080600080612691611ae7565b905060028160ff16036126aa576000935050505061277e565b60008160ff1611156126f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126e890614d86565b60405180910390fd5b6126f9612052565b5061270385611bb4565b9250612710338785612d66565b91508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8760405161276f9190614808565b60405180910390a38193505050505b92915050565b60115481565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000806000601260009054906101000a900460ff16156127d857600094505050505061291f565b6127e3600354611ac0565b9250600083036127fa57600094505050505061291f565b600260009054906101000a9004600f0b905060008611801561281b57508286105b15612824578592505b61282d83612be3565b9150612848600d60009054906101000a9004600f0b83612cb2565b935061285384612d8b565b935061286e600260009054906101000a9004600f0b85612cb2565b600260006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550603c836128b69190614f15565b6003546128c39190614e75565b60038190555080600f0b836003547f1c9c74563c32efd114cb36fb5e432d9386c8254d08456614804a33a3088ab736600260009054906101000a9004600f0b60405161290f9190614772565b60405180910390a4829450505050505b919050565b600a5481565b612937600460ff166113ca565b1561294157600080fd5b601260009054906101000a900460ff161561295b57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146129b557600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000816129e19190614f15565b7f0000000000000000000000000000000000000000000000000000000000000000612a0c9190614e75565b60118190555050565b6000600c54905090565b6000816000015163ffffffff169050919050565b612a3b6144ca565b612a436144ca565b82816000019063ffffffff16908163ffffffff168152505083816020019068ffffffffffffffffff16908168ffffffffffffffffff168152505067ffffffffffffffff8516816040019067ffffffffffffffff16908167ffffffffffffffff168152505080915050949350505050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042612b049190614e41565b612b0e9190614f86565b612b189190614e75565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612b9d57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000677fffffffffffffff821115612bfa57600080fd5b6040829060020a029050919050565b60008082600f0b13612c1a57600080fd5b60806fb17217f7d1cf79abc9e3b39803f2f6af612c36846134e8565b600f0b02908060020a82049150509050919050565b60008082600f0b84600f0b0390507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b8112158015612c9f57506f7fffffffffffffffffffffffffffffff600f0b8113155b612ca857600080fd5b8091505092915050565b600080604083600f0b85600f0b029060008212600003808260020a82851804189250505090507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b8112158015612d1e57506f7fffffffffffffffffffffffffffffff600f0b8113155b612d2757600080fd5b8091505092915050565b60008082600f0b1215612d4357600080fd5b604082600f0b9060008212600003808260020a8285180418925050509050919050565b600080612d738584612e18565b50612d7e8484612f1f565b5060019150509392505050565b60006840000000000000000082600f0b12612da557600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b1215612dd95760009050612e13565b612e106080700171547652b82fe1777d0ffda0d23a7d1284600f0b029060008212600003808260020a8285180418925050506136ae565b90505b919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008503612e745760009350505050612f19565b612e7d86611a17565b925084831015612ec2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612eb99061510a565b60405180910390fd5b8483612ece9190614e41565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008503612f7b5760009350505050612fdd565b612f8486611a17565b92508483612f929190614e75565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000612fed6144ca565b6000612ff76110b8565b90506000600160008054905061300d9190614e41565b8154811061301e5761301d61508f565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681525050915080826020019068ffffffffffffffffff16908168ffffffffffffffffff168152505081600060016000805490506130f99190614e41565b8154811061310a5761310961508f565b5b9060005260206000200160008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555090505060019250505090565b60008082600f0b036131b857600080fd5b600082600f0b604085600f0b9060020a02816131d7576131d6614f57565b5b0590507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b811215801561322057506f7fffffffffffffffffffffffffffffff600f0b8113155b61322957600080fd5b8091505092915050565b61323b6144ca565b6132436144ca565b61324b6144ca565b600080600a54815481106132625761326161508f565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152505092503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381865afa15801561336d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133919190615156565b6fffffffffffffffffffffffffffffffff1690506133ae83612a1f565b81116133bf578193505050506133c6565b8293505050505b90565b60008060006133d784611c97565b6133df6110b8565b6133e99190614e41565b9150600b546133f783611bb4565b6134019190614e41565b905061342f601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682612f1f565b50836000015163ffffffff16601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f9a2a887706623ad3ff7fc85652deeceabe9fe1e00466c597972079ee91ea40d3846040516134a39190614808565b60405180910390a36001600a60008282546134be9190614e75565b9250508190555080600b60008282546134d79190614e75565b925050819055508192505050919050565b60008082600f0b136134f957600080fd5b60008083600f0b9050680100000000000000008112613534576040819060008212600003808260020a82851804189250505090506040820191505b6401000000008112613562576020819060008212600003808260020a82851804189250505090506020820191505b62010000811261358e576010819060008212600003808260020a82851804189250505090506010820191505b61010081126135b9576008819060008212600003808260020a82851804189250505090506008820191505b601081126135e3576004819060008212600003808260020a82851804189250505090506004820191505b6004811261360d576002819060008212600003808260020a82851804189250505090506002820191505b6002811261361c576001820191505b600060408084039060020a029050600083607f0386600f0b9060020a029050600067800000000000000090505b60008113156136a1578182029150600060ff83908060020a8204915050905080607f0183908060020a8204915050925080820284019350506001819060008212600003808260020a8285180418925050509050613649565b5081945050505050919050565b60006840000000000000000082600f0b126136c857600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b12156136fc57600090506144c5565b60006f80000000000000000000000000000000905060006780000000000000008416600f0b131561374a57608070016a09e667f3bcc908b2fb1366ea957d3e8202908060020a820491505090505b60006740000000000000008416600f0b13156137835760807001306fe0a31b7152de8d5a46305c85edec8202908060020a820491505090505b60006720000000000000008416600f0b13156137bc5760807001172b83c7d517adcdf7c8c50eb14a791f8202908060020a820491505090505b60006710000000000000008416600f0b13156137f557608070010b5586cf9890f6298b92b71842a983638202908060020a820491505090505b60006708000000000000008416600f0b131561382e5760807001059b0d31585743ae7c548eb68ca417fd8202908060020a820491505090505b60006704000000000000008416600f0b1315613867576080700102c9a3e778060ee6f7caca4f7a29bde88202908060020a820491505090505b60006702000000000000008416600f0b13156138a057608070010163da9fb33356d84a66ae336dcdfa3f8202908060020a820491505090505b60006701000000000000008416600f0b13156138d9576080700100b1afa5abcbed6129ab13ec11dc95438202908060020a820491505090505b600066800000000000008416600f0b131561391157608070010058c86da1c09ea1ff19d294cf2f679b8202908060020a820491505090505b600066400000000000008416600f0b13156139495760807001002c605e2e8cec506d21bfc89a23a00f8202908060020a820491505090505b600066200000000000008416600f0b1315613981576080700100162f3904051fa128bca9c55c31e5df8202908060020a820491505090505b600066100000000000008416600f0b13156139b95760807001000b175effdc76ba38e31671ca9397258202908060020a820491505090505b600066080000000000008416600f0b13156139f1576080700100058ba01fb9f96d6cacd4b180917c3d8202908060020a820491505090505b600066040000000000008416600f0b1315613a2957608070010002c5cc37da9491d0985c348c68e7b38202908060020a820491505090505b600066020000000000008416600f0b1315613a615760807001000162e525ee054754457d59952920268202908060020a820491505090505b600066010000000000008416600f0b1315613a9957608070010000b17255775c040618bf4a4ade83fc8202908060020a820491505090505b6000658000000000008416600f0b1315613ad05760807001000058b91b5bc9ae2eed81e9b7d4cfab8202908060020a820491505090505b6000654000000000008416600f0b1315613b07576080700100002c5c89d5ec6ca4d7c8acc017b7c98202908060020a820491505090505b6000652000000000008416600f0b1315613b3e57608070010000162e43f4f831060e02d839a9d16d8202908060020a820491505090505b6000651000000000008416600f0b1315613b75576080700100000b1721bcfc99d9f890ea069117638202908060020a820491505090505b6000650800000000008416600f0b1315613bac57608070010000058b90cf1e6d97f9ca14dbcc16288202908060020a820491505090505b6000650400000000008416600f0b1315613be35760807001000002c5c863b73f016468f6bac5ca2b8202908060020a820491505090505b6000650200000000008416600f0b1315613c1a576080700100000162e430e5a18f6119e3c02282a58202908060020a820491505090505b6000650100000000008416600f0b1315613c515760807001000000b1721835514b86e6d96efd1bfe8202908060020a820491505090505b60006480000000008416600f0b1315613c87576080700100000058b90c0b48c6be5df846c5b2ef8202908060020a820491505090505b60006440000000008416600f0b1315613cbd57608070010000002c5c8601cc6b9e94213c72737a8202908060020a820491505090505b60006420000000008416600f0b1315613cf35760807001000000162e42fff037df38aa2b219f068202908060020a820491505090505b60006410000000008416600f0b1315613d2957608070010000000b17217fba9c739aa5819f44f98202908060020a820491505090505b60006408000000008416600f0b1315613d5f5760807001000000058b90bfcdee5acd3c1cedc8238202908060020a820491505090505b60006404000000008416600f0b1315613d95576080700100000002c5c85fe31f35a6a30da1be508202908060020a820491505090505b60006402000000008416600f0b1315613dcb57608070010000000162e42ff0999ce3541b9fffcf8202908060020a820491505090505b60006401000000008416600f0b1315613e01576080700100000000b17217f80f4ef5aadda455548202908060020a820491505090505b600063800000008416600f0b1315613e3657608070010000000058b90bfbf8479bd5a81b51ad8202908060020a820491505090505b600063400000008416600f0b1315613e6b5760807001000000002c5c85fdf84bd62ae30a74cc8202908060020a820491505090505b600063200000008416600f0b1315613ea0576080700100000000162e42fefb2fed257559bdaa8202908060020a820491505090505b600063100000008416600f0b1315613ed55760807001000000000b17217f7d5a7716bba4a9ae8202908060020a820491505090505b600063080000008416600f0b1315613f0a576080700100000000058b90bfbe9ddbac5e109cce8202908060020a820491505090505b600063040000008416600f0b1315613f3f57608070010000000002c5c85fdf4b15de6f17eb0d8202908060020a820491505090505b600063020000008416600f0b1315613f745760807001000000000162e42fefa494f1478fde058202908060020a820491505090505b600063010000008416600f0b1315613fa957608070010000000000b17217f7d20cf927c8e94c8202908060020a820491505090505b6000628000008416600f0b1315613fdd5760807001000000000058b90bfbe8f71cb4e4b33d8202908060020a820491505090505b6000624000008416600f0b1315614011576080700100000000002c5c85fdf477b662b269458202908060020a820491505090505b6000622000008416600f0b131561404557608070010000000000162e42fefa3ae53369388c8202908060020a820491505090505b6000621000008416600f0b1315614079576080700100000000000b17217f7d1d351a389d408202908060020a820491505090505b6000620800008416600f0b13156140ad57608070010000000000058b90bfbe8e8b2d3d4ede8202908060020a820491505090505b6000620400008416600f0b13156140e15760807001000000000002c5c85fdf4741bea6e77e8202908060020a820491505090505b6000620200008416600f0b1315614115576080700100000000000162e42fefa39fe95583c28202908060020a820491505090505b6000620100008416600f0b13156141495760807001000000000000b17217f7d1cfb72b45e18202908060020a820491505090505b60006180008416600f0b131561417c576080700100000000000058b90bfbe8e7cc35c3f08202908060020a820491505090505b60006140008416600f0b13156141af57608070010000000000002c5c85fdf473e242ea388202908060020a820491505090505b60006120008416600f0b13156141e25760807001000000000000162e42fefa39f02b772c8202908060020a820491505090505b60006110008416600f0b131561421557608070010000000000000b17217f7d1cf7d83c1a8202908060020a820491505090505b60006108008416600f0b13156142485760807001000000000000058b90bfbe8e7bdcbe2e8202908060020a820491505090505b60006104008416600f0b131561427b576080700100000000000002c5c85fdf473dea871f8202908060020a820491505090505b60006102008416600f0b13156142ae57608070010000000000000162e42fefa39ef44d918202908060020a820491505090505b60006101008416600f0b13156142e1576080700100000000000000b17217f7d1cf79e9498202908060020a820491505090505b600060808416600f0b131561431357608070010000000000000058b90bfbe8e7bce5448202908060020a820491505090505b600060408416600f0b13156143455760807001000000000000002c5c85fdf473de6eca8202908060020a820491505090505b600060208416600f0b1315614377576080700100000000000000162e42fefa39ef366f8202908060020a820491505090505b600060108416600f0b13156143a95760807001000000000000000b17217f7d1cf79afa8202908060020a820491505090505b600060088416600f0b13156143db576080700100000000000000058b90bfbe8e7bcd6d8202908060020a820491505090505b600060048416600f0b131561440d57608070010000000000000002c5c85fdf473de6b28202908060020a820491505090505b600060028416600f0b131561443f5760807001000000000000000162e42fefa39ef3588202908060020a820491505090505b600060018416600f0b131561447157608070010000000000000000b17217f7d1cf79ab8202908060020a820491505090505b604083600f0b9060008212600003808260020a828518041892505050603f03600f0b81908060020a820491505090506f7fffffffffffffffffffffffffffffff600f0b8111156144c057600080fd5b809150505b919050565b6040518060600160405280600063ffffffff168152602001600068ffffffffffffffffff168152602001600067ffffffffffffffff1681525090565b6000604051905090565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61454a81614515565b811461455557600080fd5b50565b60008135905061456781614541565b92915050565b60006020828403121561458357614582614510565b5b600061459184828501614558565b91505092915050565b60008115159050919050565b6145af8161459a565b82525050565b60006020820190506145ca60008301846145a6565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561460a5780820151818401526020810190506145ef565b60008484015250505050565b6000601f19601f8301169050919050565b6000614632826145d0565b61463c81856145db565b935061464c8185602086016145ec565b61465581614616565b840191505092915050565b6000602082019050818103600083015261467a8184614627565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006146ad82614682565b9050919050565b6146bd816146a2565b81146146c857600080fd5b50565b6000813590506146da816146b4565b92915050565b6000819050919050565b6146f3816146e0565b81146146fe57600080fd5b50565b600081359050614710816146ea565b92915050565b6000806040838503121561472d5761472c614510565b5b600061473b858286016146cb565b925050602061474c85828601614701565b9150509250929050565b600081600f0b9050919050565b61476c81614756565b82525050565b60006020820190506147876000830184614763565b92915050565b61479681614756565b81146147a157600080fd5b50565b6000813590506147b38161478d565b92915050565b600080604083850312156147d0576147cf614510565b5b60006147de85828601614701565b92505060206147ef858286016147a4565b9150509250929050565b614802816146e0565b82525050565b600060208201905061481d60008301846147f9565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61486082614616565b810181811067ffffffffffffffff8211171561487f5761487e614828565b5b80604052505050565b6000614892614506565b905061489e8282614857565b919050565b600063ffffffff82169050919050565b6148bc816148a3565b81146148c757600080fd5b50565b6000813590506148d9816148b3565b92915050565b600068ffffffffffffffffff82169050919050565b6148fd816148df565b811461490857600080fd5b50565b60008135905061491a816148f4565b92915050565b600067ffffffffffffffff82169050919050565b61493d81614920565b811461494857600080fd5b50565b60008135905061495a81614934565b92915050565b60006060828403121561497657614975614823565b5b6149806060614888565b90506000614990848285016148ca565b60008301525060206149a48482850161490b565b60208301525060406149b88482850161494b565b60408301525092915050565b6000606082840312156149da576149d9614510565b5b60006149e884828501614960565b91505092915050565b600080600060608486031215614a0a57614a09614510565b5b6000614a18868287016146cb565b9350506020614a29868287016146cb565b9250506040614a3a86828701614701565b9150509250925092565b600060208284031215614a5a57614a59614510565b5b6000614a6884828501614701565b91505092915050565b600060208284031215614a8757614a86614510565b5b6000614a95848285016146cb565b91505092915050565b60008060408385031215614ab557614ab4614510565b5b6000614ac385828601614701565b9250506020614ad485828601614701565b9150509250929050565b614ae7816148a3565b82525050565b614af6816148df565b82525050565b614b0581614920565b82525050565b6000606082019050614b206000830186614ade565b614b2d6020830185614aed565b614b3a6040830184614afc565b949350505050565b600060ff82169050919050565b614b5881614b42565b82525050565b6000602082019050614b736000830184614b4f565b92915050565b614b82816146a2565b82525050565b6000602082019050614b9d6000830184614b79565b92915050565b60008060008060808587031215614bbd57614bbc614510565b5b6000614bcb87828801614701565b9450506020614bdc878288016147a4565b9350506040614bed87828801614701565b9250506060614bfe87828801614701565b91505092959194509250565b614c13816148a3565b82525050565b614c22816148df565b82525050565b614c3181614920565b82525050565b606082016000820151614c4d6000850182614c0a565b506020820151614c606020850182614c19565b506040820151614c736040850182614c28565b50505050565b6000606082019050614c8e6000830184614c37565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b614cb981614c94565b82525050565b6000602082019050614cd46000830184614cb0565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680614d2157607f821691505b602082108103614d3457614d33614cda565b5b50919050565b7f4558504952454400000000000000000000000000000000000000000000000000600082015250565b6000614d706007836145db565b9150614d7b82614d3a565b602082019050919050565b60006020820190508181036000830152614d9f81614d63565b9050919050565b7f5a45524f5f464952535400000000000000000000000000000000000000000000600082015250565b6000614ddc600a836145db565b9150614de782614da6565b602082019050919050565b60006020820190508181036000830152614e0b81614dcf565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614e4c826146e0565b9150614e57836146e0565b9250828203905081811115614e6f57614e6e614e12565b5b92915050565b6000614e80826146e0565b9150614e8b836146e0565b9250828201905080821115614ea357614ea2614e12565b5b92915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b6000614edf600a836145db565b9150614eea82614ea9565b602082019050919050565b60006020820190508181036000830152614f0e81614ed2565b9050919050565b6000614f20826146e0565b9150614f2b836146e0565b9250828202614f39816146e0565b91508282048414831517614f5057614f4f614e12565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000614f91826146e0565b9150614f9c836146e0565b925082614fac57614fab614f57565b5b828204905092915050565b7f4552525f494e56414c49445f5354415445000000000000000000000000000000600082015250565b6000614fed6011836145db565b9150614ff882614fb7565b602082019050919050565b6000602082019050818103600083015261501c81614fe0565b9050919050565b7f4552525f414c52454144595f4c4f434b45440000000000000000000000000000600082015250565b60006150596012836145db565b915061506482615023565b602082019050919050565b600060208201905081810360008301526150888161504c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b60006150f4600d836145db565b91506150ff826150be565b602082019050919050565b60006020820190508181036000830152615123816150e7565b9050919050565b61513381614c94565b811461513e57600080fd5b50565b6000815190506151508161512a565b92915050565b60006020828403121561516c5761516b614510565b5b600061517a84828501615141565b9150509291505056fea264697066735822122087aed072a9ac7b5463e9d57180f7adb16b585b4eb2bff3e9f6354a0fd8a5a12664736f6c63430008110033 -\ No newline at end of file +60c06040523480156200001157600080fd5b506040516200610038038062006100833981810160405281019062000037919062000909565b6801000000000000000083600f0b126200005057600080fd5b6200005a6200061e565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600e6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550866006908162000126919062000c2a565b50856007908162000138919062000c2a565b508460ff166008819055504260038190555060035460808181525050603c8362000163919062000d40565b60a081815250506200018a60016200034f6401000000000262002d48176401000000009004565b600260006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550620001e484620003766401000000000262002d6e176401000000009004565b600d60006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff1602179055506200024e6000600260009054906101000a9004600f0b60006001620003ca640100000000026401000000009004565b90506000819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550505081601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000d8b565b6000677fffffffffffffff8211156200036757600080fd5b6040829060020a029050919050565b60008082600f0b136200038857600080fd5b60806fb17217f7d1cf79abc9e3b39803f2f6af620003b5846200044e640100000000026401000000009004565b600f0b02908060020a82049150509050919050565b620003d46200061e565b620003de6200061e565b82816000019063ffffffff16908163ffffffff168152505083816020019068ffffffffffffffffff16908168ffffffffffffffffff168152505067ffffffffffffffff8516816040019067ffffffffffffffff16908167ffffffffffffffff168152505080915050949350505050565b60008082600f0b136200046057600080fd5b60008083600f0b90506801000000000000000081126200049c576040819060008212600003808260020a82851804189250505090506040820191505b6401000000008112620004cb576020819060008212600003808260020a82851804189250505090506020820191505b620100008112620004f8576010819060008212600003808260020a82851804189250505090506010820191505b610100811262000524576008819060008212600003808260020a82851804189250505090506008820191505b601081126200054f576004819060008212600003808260020a82851804189250505090506004820191505b600481126200057a576002819060008212600003808260020a82851804189250505090506002820191505b600281126200058a576001820191505b600060408084039060020a029050600083607f0386600f0b9060020a029050600067800000000000000090505b600081131562000611578182029150600060ff83908060020a8204915050905080607f0183908060020a8204915050925080820284019350506001819060008212600003808260020a8285180418925050509050620005b7565b5081945050505050919050565b6040518060600160405280600063ffffffff168152602001600068ffffffffffffffffff168152602001600067ffffffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620006c38262000678565b810181811067ffffffffffffffff82111715620006e557620006e462000689565b5b80604052505050565b6000620006fa6200065a565b9050620007088282620006b8565b919050565b600067ffffffffffffffff8211156200072b576200072a62000689565b5b620007368262000678565b9050602081019050919050565b60005b838110156200076357808201518184015260208101905062000746565b60008484015250505050565b60006200078662000780846200070d565b620006ee565b905082815260208101848484011115620007a557620007a462000673565b5b620007b284828562000743565b509392505050565b600082601f830112620007d257620007d16200066e565b5b8151620007e48482602086016200076f565b91505092915050565b600060ff82169050919050565b6200080581620007ed565b81146200081157600080fd5b50565b6000815190506200082581620007fa565b92915050565b600081600f0b9050919050565b62000843816200082b565b81146200084f57600080fd5b50565b600081519050620008638162000838565b92915050565b6000819050919050565b6200087e8162000869565b81146200088a57600080fd5b50565b6000815190506200089e8162000873565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620008d182620008a4565b9050919050565b620008e381620008c4565b8114620008ef57600080fd5b50565b6000815190506200090381620008d8565b92915050565b60008060008060008060c0878903121562000929576200092862000664565b5b600087015167ffffffffffffffff8111156200094a576200094962000669565b5b6200095889828a01620007ba565b965050602087015167ffffffffffffffff8111156200097c576200097b62000669565b5b6200098a89828a01620007ba565b95505060406200099d89828a0162000814565b9450506060620009b089828a0162000852565b9350506080620009c389828a016200088d565b92505060a0620009d689828a01620008f2565b9150509295509295509295565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062000a3657607f821691505b60208210810362000a4c5762000a4b620009ee565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b60006008830262000ab97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000a77565b62000ac5868362000a77565b95508019841693508086168417925050509392505050565b6000819050919050565b600062000b0862000b0262000afc8462000869565b62000add565b62000869565b9050919050565b6000819050919050565b62000b248362000ae7565b62000b3c62000b338262000b0f565b84845462000a87565b825550505050565b600090565b62000b5362000b44565b62000b6081848462000b19565b505050565b5b8181101562000b885762000b7c60008262000b49565b60018101905062000b66565b5050565b601f82111562000bd75762000ba18162000a52565b62000bac8462000a67565b8101602085101562000bbc578190505b62000bd462000bcb8562000a67565b83018262000b65565b50505b505050565b60008160020a8304905092915050565b600062000bff6000198460080262000bdc565b1980831691505092915050565b600062000c1a838362000bec565b9150826002028217905092915050565b62000c3582620009e3565b67ffffffffffffffff81111562000c515762000c5062000689565b5b62000c5d825462000a1d565b62000c6a82828562000b8c565b600060209050601f83116001811462000ca2576000841562000c8d578287015190505b62000c99858262000c0c565b86555062000d09565b601f19841662000cb28662000a52565b60005b8281101562000cdc5784890151825560018201915060208501945060208101905062000cb5565b8683101562000cfc578489015162000cf8601f89168262000bec565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000d4d8262000869565b915062000d5a8362000869565b925082820262000d6a8162000869565b9150828204841483151762000d845762000d8362000d11565b5b5092915050565b60805160a05161531e62000de260003960008181611aec015281816122d5015281816128d701528181612b0a0152612c1e015260008181611b1801528181612b3601528181612c3f0152612c84015261531e6000f3fe608060405234801561001057600080fd5b50600436106103a0576000357c0100000000000000000000000000000000000000000000000000000000900480636a2d094e116101fb578063983b2d561161012c578063d5abeb01116100ca578063e69571af11610099578063e69571af14610ba9578063e809529514610bd9578063eda4e6d614610bf7578063f2fde38b14610c15576103a0565b8063d5abeb0114610b21578063d7a52fa914610b3f578063d89135cd14610b5b578063e54063a614610b79576103a0565b8063b1cb0db311610106578063b1cb0db314610a97578063b470aade14610ab5578063c0ab707714610ad3578063d340ef8a14610b03576103a0565b8063983b2d5614610a07578063a457c2d714610a37578063a9059cbb14610a67576103a0565b806379ba5097116101995780638da5cb5b116101735780638da5cb5b146109915780638f0b2d5d146109af5780638f1df6bc146109cb57806395d89b41146109e9576103a0565b806379ba50971461092557806384dde4af1461094357806386fe212d14610961576103a0565b8063731f237c116101d5578063731f237c1461089b57806373f42561146108b95780637445e33a146108d757806374bedb9514610907576103a0565b80636a2d094e1461081f5780636f8b44b01461084f57806370a082311461086b576103a0565b80633092afd5116102d5578063449a52f81161027357806351b4541c1161024d57806351b4541c1461078357806358b2833b146107b35780635f408c04146107d15780636787a9be146107ef576103a0565b8063449a52f8146106f357806347a50517146107235780634abfbba214610753576103a0565b806331a5995d116102af57806331a5995d14610657578063395093511461067557806340452d91146106a557806342966c68146106d7576103a0565b80633092afd5146105d95780633133348714610609578063313ce56714610639576103a0565b80631989c6a81161034257806323a859441161031c57806323a859441461051957806323b872dd146105495780632a7aec09146105795780632c1758c1146105a9576103a0565b80631989c6a8146104ad578063213d1e1e146104cb578063229ba197146104fb576103a0565b806309f28f3c1161037e57806309f28f3c1461042357806311c566151461044157806318160ddd1461047157806318cbbcfc1461048f576103a0565b806301ffc9a7146103a557806306fdde03146103d5578063095ea7b3146103f3575b600080fd5b6103bf60048036038101906103ba91906146d2565b610c45565b6040516103cc919061471a565b60405180910390f35b6103dd610deb565b6040516103ea91906147c5565b60405180910390f35b61040d6004803603810190610408919061487b565b610e79565b60405161041a919061471a565b60405180910390f35b61042b6110b5565b60405161043891906148d7565b60405180910390f35b61045b6004803603810190610456919061491e565b6110c8565b604051610468919061496d565b60405180910390f35b610479611118565b604051610486919061496d565b60405180910390f35b61049761112f565b6040516104a4919061496d565b60405180910390f35b6104b5611134565b6040516104c2919061496d565b60405180910390f35b6104e560048036038101906104e09190614b29565b611140565b6040516104f2919061496d565b60405180910390f35b610503611159565b60405161051091906148d7565b60405180910390f35b610533600480360381019061052e9190614b29565b61116c565b604051610540919061471a565b60405180910390f35b610563600480360381019061055e9190614b56565b6111d4565b604051610570919061471a565b60405180910390f35b610593600480360381019061058e9190614b29565b6113f2565b6040516105a091906148d7565b60405180910390f35b6105c360048036038101906105be9190614ba9565b61142a565b6040516105d0919061471a565b60405180910390f35b6105f360048036038101906105ee9190614bd6565b61145d565b604051610600919061471a565b60405180910390f35b610623600480360381019061061e9190614c03565b611567565b604051610630919061496d565b60405180910390f35b6106416115d3565b60405161064e919061496d565b60405180910390f35b61065f6115d9565b60405161066c919061496d565b60405180910390f35b61068f600480360381019061068a919061487b565b6115df565b60405161069c919061471a565b60405180910390f35b6106bf60048036038101906106ba9190614ba9565b611775565b6040516106ce93929190614c70565b60405180910390f35b6106f160048036038101906106ec9190614ba9565b6117e4565b005b61070d6004803603810190610708919061487b565b611920565b60405161071a919061471a565b60405180910390f35b61073d60048036038101906107389190614bd6565b611a9f565b60405161074a919061496d565b60405180910390f35b61076d60048036038101906107689190614ba9565b611ae8565b60405161077a919061496d565b60405180910390f35b61079d60048036038101906107989190614ba9565b611b48565b6040516107aa919061496d565b60405180910390f35b6107bb611b69565b6040516107c8919061496d565b60405180910390f35b6107d9611b6f565b6040516107e69190614cc3565b60405180910390f35b61080960048036038101906108049190614ba9565b611c3c565b604051610816919061496d565b60405180910390f35b61083960048036038101906108349190614ba9565b611c7d565b604051610846919061496d565b60405180910390f35b61086960048036038101906108649190614ba9565b611c9e565b005b61088560048036038101906108809190614bd6565b611d61565b604051610892919061496d565b60405180910390f35b6108a3611dcb565b6040516108b0919061496d565b60405180910390f35b6108c1611ddc565b6040516108ce919061496d565b60405180910390f35b6108f160048036038101906108ec9190614b29565b611de2565b6040516108fe919061496d565b60405180910390f35b61090f611e10565b60405161091c919061496d565b60405180910390f35b61092d611e16565b60405161093a919061471a565b60405180910390f35b61094b611fbd565b6040516109589190614ced565b60405180910390f35b61097b60048036038101906109769190614ba9565b611fe3565b604051610988919061496d565b60405180910390f35b6109996120c2565b6040516109a69190614ced565b60405180910390f35b6109c960048036038101906109c49190614bd6565b6120e8565b005b6109d361219d565b6040516109e0919061471a565b60405180910390f35b6109f161244d565b6040516109fe91906147c5565b60405180910390f35b610a216004803603810190610a1c9190614bd6565b6124db565b604051610a2e919061471a565b60405180910390f35b610a516004803603810190610a4c919061487b565b6125af565b604051610a5e919061471a565b60405180910390f35b610a816004803603810190610a7c919061487b565b6127ce565b604051610a8e919061471a565b60405180910390f35b610a9f6128cf565b604051610aac919061496d565b60405180910390f35b610abd6128d5565b604051610aca919061496d565b60405180910390f35b610aed6004803603810190610ae89190614ba9565b6128f9565b604051610afa919061496d565b60405180910390f35b610b0b612a6f565b604051610b18919061496d565b60405180910390f35b610b29612a75565b604051610b36919061496d565b60405180910390f35b610b596004803603810190610b549190614ba9565b612a7b565b005b610b63612b7a565b604051610b70919061496d565b60405180910390f35b610b936004803603810190610b8e9190614b29565b612b84565b604051610ba0919061496d565b60405180910390f35b610bc36004803603810190610bbe9190614d08565b612b98565b604051610bd09190614dde565b60405180910390f35b610be1612c18565b604051610bee9190614e24565b60405180910390f35b610bff612c82565b604051610c0c919061496d565b60405180910390f35b610c2f6004803603810190610c2a9190614bd6565b612ca6565b604051610c3c919061471a565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610c995760019050610de6565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610ceb5760019050610de6565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610d3d5760019050610de6565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610d8f5760019050610de6565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610de15760019050610de6565b600090505b919050565b60068054610df890614e6e565b80601f0160208091040260200160405190810160405280929190818152602001828054610e2490614e6e565b8015610e715780601f10610e4657610100808354040283529160200191610e71565b820191906000526020600020905b815481529060010190602001808311610e5457829003601f168201915b505050505081565b6000806000610e86611b6f565b905060028160ff1603610e9e576000925050506110af565b60008160ff161115610ee5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610edc90614eeb565b60405180910390fd5b6000600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115610fae5760008414610fad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa490614f57565b60405180910390fd5b5b610fb661219d565b50610fc084611c3c565b915081600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925866040516110a0919061496d565b60405180910390a36001925050505b92915050565b600260009054906101000a9004600f0b81565b6000806110ef6110d785612d48565b6110ea6110e46001612d48565b86612db0565b612e17565b90506110fa81612e96565b67ffffffffffffffff168461110f9190614fa6565b91505092915050565b6000600c5460095461112a9190614fa6565b905090565b600f81565b60008080549050905090565b6000816020015168ffffffffffffffffff169050919050565b600d60009054906101000a9004600f0b81565b600080826000015163ffffffff16111561118957600090506111cf565b6000826020015168ffffffffffffffffff1611156111aa57600090506111cf565b6000826040015167ffffffffffffffff1611156111ca57600090506111cf565b600190505b919050565b6000806000806111e2611b6f565b905060028160ff16036111fb57600093505050506113eb565b60008160ff161115611242576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123990614eeb565b60405180910390fd5b61124a61219d565b5061125485611c3c565b925082600f60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156112df57600080fd5b82600f60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461136b9190614fa6565b9250508190555061137d878785612ecb565b91508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef876040516113dc919061496d565b60405180910390a38193505050505b9392505050565b60008067ffffffffffffffff836040015160070b169050600081600f0b036114215761141e6001612d48565b90505b80915050919050565b6000600f821061143957600080fd5b6000820361144e57600f601454149050611458565b8160145483161490505b919050565b600061146c600160ff1661142a565b1561147657600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806114fd57503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b61150657600080fd5b6000600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b60008060008061157686612d48565b925061158185612d48565b915061159c600d60009054906101000a9004600f0b83612e17565b90506115a781612ef0565b90506115b38382612e17565b90506115be81612e96565b67ffffffffffffffff16935050505092915050565b60085481565b60145481565b6000806115ea61219d565b506115f483611c3c565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546116829190614fda565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054604051611762919061496d565b60405180910390a3600191505092915050565b6000818154811061178557600080fd5b906000526020600020016000915090508060000160009054906101000a900463ffffffff16908060000160049054906101000a900468ffffffffffffffffff169080600001600d9054906101000a900467ffffffffffffffff16905083565b60006117ee611b6f565b60ff16146117fb57600080fd5b600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661185157600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481111561189d57600080fd5b60006118a882611c3c565b90506118b43382612f7d565b5081600c60008282546118c79190614fda565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca583604051611914919061496d565b60405180910390a25050565b600080600061192d611b6f565b60ff161461193a57600080fd5b600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166119c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119bd9061505a565b60405180910390fd5b6119ce61219d565b50600060135411156119f757601354836009546119eb9190614fda565b11156119f657600080fd5b5b8260096000828254611a099190614fda565b92505081905550611a1983611c3c565b9050611a258482613084565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f885604051611a83919061496d565b60405180910390a3611a93613148565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f000000000000000000000000000000000000000000000000000000000000000082611b16919061507a565b7f0000000000000000000000000000000000000000000000000000000000000000611b419190614fda565b9050919050565b6000603c8242611b589190614fa6565b611b6291906150eb565b9050919050565b60035481565b6000601260009054906101000a900460ff1615611b8f5760019050611c39565b600060115403611ba25760009050611c39565b6011544210611c3457611bcf603c600354611bbd91906150eb565b601154611bca9190614fa6565b6128f9565b506001601260006101000a81548160ff0219169083151502179055507ff80dbaea4785589e52984ca36a31de106adc77759539a5c7d92883bf49692fe942604051611c1a919061496d565b60405180910390a1611c2a61219d565b5060029050611c39565b600090505b90565b600080611c60611c4b84612d48565b600260009054906101000a9004600f0b61330c565b9050611c6b81612e96565b67ffffffffffffffff16915050919050565b6000603c8242611c8d9190614fa6565b611c9791906150eb565b9050919050565b611cab600860ff1661142a565b15611cb557600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d0f57600080fd5b6009548111611d1d57600080fd5b6013547f9722adea12ab7ef86fc45b88f0e0b567639e8dddaae60261e08c03d747fbbfe682604051611d4f919061496d565b60405180910390a28060138190555050565b6000806000806000611d7a611d7587611a9f565b612d48565b9350611d87600354611b48565b9150611da284600260009054906101000a9004600f0b612e17565b9250611dc0611db084612e96565b67ffffffffffffffff1683611567565b945050505050919050565b6000611dd760006128f9565b905090565b600c5481565b6000806000611df084611140565b9150611dfb846113f2565b9050611e0782826110c8565b92505050919050565b600b5481565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e7357600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060108210612028576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161201f90615168565b60405180910390fd5b600060145483161461206f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612066906151d4565b60405180910390fd5b816014600082825417925050819055507fdd5e7cad9599c1dcaa8d5adcd88f157fc5fada62511c0d3edb1bfd3b778acc416014546040516120b0919061496d565b60405180910390a16014549050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6120f5600260ff1661142a565b156120ff57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461215957600080fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006121a761462f565b6121af61462f565b6121b761462f565b60008060008060006121c7611dcb565b506121d0613398565b97506121db8861116c565b156121f15760009850505050505050505061244a565b6000600a5481548110612207576122066151f4565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152505095506122b488612b84565b94506001856122c39190614fda565b90506122ce866113f2565b9350603c857f00000000000000000000000000000000000000000000000000000000000000006122fe919061507a565b61230891906150eb565b915061233361232e600d60009054906101000a9004600f0b61232985612d48565b612e17565b612ef0565b9250612349600084612343611118565b84612b98565b96506000879080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050506124058761352e565b507f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d67581604051612435919061496d565b60405180910390a16001985050505050505050505b90565b6007805461245a90614e6e565b80601f016020809104026020016040519081016040528092919081815260200182805461248690614e6e565b80156124d35780601f106124a8576101008083540402835291602001916124d3565b820191906000526020600020905b8154815290600101906020018083116124b657829003601f168201915b505050505081565b60006124ea600160ff1661142a565b156124f457600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461254e57600080fd5b6001600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000806125bb83611c3c565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561264657600080fd5b61264e61219d565b5080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546126db9190614fa6565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040516127bb919061496d565b60405180910390a3600191505092915050565b6000806000806127dc611b6f565b905060028160ff16036127f557600093505050506128c9565b60008160ff16111561283c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161283390614eeb565b60405180910390fd5b61284461219d565b5061284e85611c3c565b925061285b338785612ecb565b91508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef876040516128ba919061496d565b60405180910390a38193505050505b92915050565b60115481565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000806000601260009054906101000a900460ff1615612923576000945050505050612a6a565b61292e600354611b48565b925060008303612945576000945050505050612a6a565b600260009054906101000a9004600f0b905060008611801561296657508286105b1561296f578592505b61297883612d48565b9150612993600d60009054906101000a9004600f0b83612e17565b935061299e84612ef0565b93506129b9600260009054906101000a9004600f0b85612e17565b600260006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550603c83612a01919061507a565b600354612a0e9190614fda565b60038190555080600f0b836003547f1c9c74563c32efd114cb36fb5e432d9386c8254d08456614804a33a3088ab736600260009054906101000a9004600f0b604051612a5a91906148d7565b60405180910390a4829450505050505b919050565b600a5481565b60135481565b6000612a8a600460ff1661142a565b15612a9457600080fd5b601260009054906101000a900460ff1615612aae57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612b0857600080fd5b7f000000000000000000000000000000000000000000000000000000000000000082612b34919061507a565b7f0000000000000000000000000000000000000000000000000000000000000000612b5f9190614fda565b90506011548111612b6f57600080fd5b806011819055505050565b6000600c54905090565b6000816000015163ffffffff169050919050565b612ba061462f565b612ba861462f565b82816000019063ffffffff16908163ffffffff168152505083816020019068ffffffffffffffffff16908168ffffffffffffffffff168152505067ffffffffffffffff8516816040019067ffffffffffffffff16908167ffffffffffffffff168152505080915050949350505050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042612c699190614fa6565b612c7391906150eb565b612c7d9190614fda565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612d0257600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000677fffffffffffffff821115612d5f57600080fd5b6040829060020a029050919050565b60008082600f0b13612d7f57600080fd5b60806fb17217f7d1cf79abc9e3b39803f2f6af612d9b8461364d565b600f0b02908060020a82049150509050919050565b60008082600f0b84600f0b0390507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b8112158015612e0457506f7fffffffffffffffffffffffffffffff600f0b8113155b612e0d57600080fd5b8091505092915050565b600080604083600f0b85600f0b029060008212600003808260020a82851804189250505090507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b8112158015612e8357506f7fffffffffffffffffffffffffffffff600f0b8113155b612e8c57600080fd5b8091505092915050565b60008082600f0b1215612ea857600080fd5b604082600f0b9060008212600003808260020a8285180418925050509050919050565b600080612ed88584612f7d565b50612ee38484613084565b5060019150509392505050565b60006840000000000000000082600f0b12612f0a57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b1215612f3e5760009050612f78565b612f756080700171547652b82fe1777d0ffda0d23a7d1284600f0b029060008212600003808260020a828518041892505050613813565b90505b919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008503612fd9576000935050505061307e565b612fe286611a9f565b925084831015613027576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161301e9061526f565b60405180910390fd5b84836130339190614fa6565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600085036130e05760009350505050613142565b6130e986611a9f565b925084836130f79190614fda565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b600061315261462f565b600061315c611118565b9050600060016000805490506131729190614fa6565b81548110613183576131826151f4565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681525050915080826020019068ffffffffffffffffff16908168ffffffffffffffffff1681525050816000600160008054905061325e9190614fa6565b8154811061326f5761326e6151f4565b5b9060005260206000200160008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555090505060019250505090565b60008082600f0b0361331d57600080fd5b600082600f0b604085600f0b9060020a028161333c5761333b6150bc565b5b0590507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b811215801561338557506f7fffffffffffffffffffffffffffffff600f0b8113155b61338e57600080fd5b8091505092915050565b6133a061462f565b6133a861462f565b6133b061462f565b600080600a54815481106133c7576133c66151f4565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152505092503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381865afa1580156134d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134f691906152bb565b6fffffffffffffffffffffffffffffffff16905061351383612b84565b81116135245781935050505061352b565b8293505050505b90565b600080600061353c84611de2565b613544611118565b61354e9190614fa6565b9150600b5461355c83611c3c565b6135669190614fa6565b9050613594601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682613084565b50836000015163ffffffff16601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f9a2a887706623ad3ff7fc85652deeceabe9fe1e00466c597972079ee91ea40d384604051613608919061496d565b60405180910390a36001600a60008282546136239190614fda565b9250508190555080600b600082825461363c9190614fda565b925050819055508192505050919050565b60008082600f0b1361365e57600080fd5b60008083600f0b9050680100000000000000008112613699576040819060008212600003808260020a82851804189250505090506040820191505b64010000000081126136c7576020819060008212600003808260020a82851804189250505090506020820191505b6201000081126136f3576010819060008212600003808260020a82851804189250505090506010820191505b610100811261371e576008819060008212600003808260020a82851804189250505090506008820191505b60108112613748576004819060008212600003808260020a82851804189250505090506004820191505b60048112613772576002819060008212600003808260020a82851804189250505090506002820191505b60028112613781576001820191505b600060408084039060020a029050600083607f0386600f0b9060020a029050600067800000000000000090505b6000811315613806578182029150600060ff83908060020a8204915050905080607f0183908060020a8204915050925080820284019350506001819060008212600003808260020a82851804189250505090506137ae565b5081945050505050919050565b60006840000000000000000082600f0b1261382d57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b1215613861576000905061462a565b60006f80000000000000000000000000000000905060006780000000000000008416600f0b13156138af57608070016a09e667f3bcc908b2fb1366ea957d3e8202908060020a820491505090505b60006740000000000000008416600f0b13156138e85760807001306fe0a31b7152de8d5a46305c85edec8202908060020a820491505090505b60006720000000000000008416600f0b13156139215760807001172b83c7d517adcdf7c8c50eb14a791f8202908060020a820491505090505b60006710000000000000008416600f0b131561395a57608070010b5586cf9890f6298b92b71842a983638202908060020a820491505090505b60006708000000000000008416600f0b13156139935760807001059b0d31585743ae7c548eb68ca417fd8202908060020a820491505090505b60006704000000000000008416600f0b13156139cc576080700102c9a3e778060ee6f7caca4f7a29bde88202908060020a820491505090505b60006702000000000000008416600f0b1315613a0557608070010163da9fb33356d84a66ae336dcdfa3f8202908060020a820491505090505b60006701000000000000008416600f0b1315613a3e576080700100b1afa5abcbed6129ab13ec11dc95438202908060020a820491505090505b600066800000000000008416600f0b1315613a7657608070010058c86da1c09ea1ff19d294cf2f679b8202908060020a820491505090505b600066400000000000008416600f0b1315613aae5760807001002c605e2e8cec506d21bfc89a23a00f8202908060020a820491505090505b600066200000000000008416600f0b1315613ae6576080700100162f3904051fa128bca9c55c31e5df8202908060020a820491505090505b600066100000000000008416600f0b1315613b1e5760807001000b175effdc76ba38e31671ca9397258202908060020a820491505090505b600066080000000000008416600f0b1315613b56576080700100058ba01fb9f96d6cacd4b180917c3d8202908060020a820491505090505b600066040000000000008416600f0b1315613b8e57608070010002c5cc37da9491d0985c348c68e7b38202908060020a820491505090505b600066020000000000008416600f0b1315613bc65760807001000162e525ee054754457d59952920268202908060020a820491505090505b600066010000000000008416600f0b1315613bfe57608070010000b17255775c040618bf4a4ade83fc8202908060020a820491505090505b6000658000000000008416600f0b1315613c355760807001000058b91b5bc9ae2eed81e9b7d4cfab8202908060020a820491505090505b6000654000000000008416600f0b1315613c6c576080700100002c5c89d5ec6ca4d7c8acc017b7c98202908060020a820491505090505b6000652000000000008416600f0b1315613ca357608070010000162e43f4f831060e02d839a9d16d8202908060020a820491505090505b6000651000000000008416600f0b1315613cda576080700100000b1721bcfc99d9f890ea069117638202908060020a820491505090505b6000650800000000008416600f0b1315613d1157608070010000058b90cf1e6d97f9ca14dbcc16288202908060020a820491505090505b6000650400000000008416600f0b1315613d485760807001000002c5c863b73f016468f6bac5ca2b8202908060020a820491505090505b6000650200000000008416600f0b1315613d7f576080700100000162e430e5a18f6119e3c02282a58202908060020a820491505090505b6000650100000000008416600f0b1315613db65760807001000000b1721835514b86e6d96efd1bfe8202908060020a820491505090505b60006480000000008416600f0b1315613dec576080700100000058b90c0b48c6be5df846c5b2ef8202908060020a820491505090505b60006440000000008416600f0b1315613e2257608070010000002c5c8601cc6b9e94213c72737a8202908060020a820491505090505b60006420000000008416600f0b1315613e585760807001000000162e42fff037df38aa2b219f068202908060020a820491505090505b60006410000000008416600f0b1315613e8e57608070010000000b17217fba9c739aa5819f44f98202908060020a820491505090505b60006408000000008416600f0b1315613ec45760807001000000058b90bfcdee5acd3c1cedc8238202908060020a820491505090505b60006404000000008416600f0b1315613efa576080700100000002c5c85fe31f35a6a30da1be508202908060020a820491505090505b60006402000000008416600f0b1315613f3057608070010000000162e42ff0999ce3541b9fffcf8202908060020a820491505090505b60006401000000008416600f0b1315613f66576080700100000000b17217f80f4ef5aadda455548202908060020a820491505090505b600063800000008416600f0b1315613f9b57608070010000000058b90bfbf8479bd5a81b51ad8202908060020a820491505090505b600063400000008416600f0b1315613fd05760807001000000002c5c85fdf84bd62ae30a74cc8202908060020a820491505090505b600063200000008416600f0b1315614005576080700100000000162e42fefb2fed257559bdaa8202908060020a820491505090505b600063100000008416600f0b131561403a5760807001000000000b17217f7d5a7716bba4a9ae8202908060020a820491505090505b600063080000008416600f0b131561406f576080700100000000058b90bfbe9ddbac5e109cce8202908060020a820491505090505b600063040000008416600f0b13156140a457608070010000000002c5c85fdf4b15de6f17eb0d8202908060020a820491505090505b600063020000008416600f0b13156140d95760807001000000000162e42fefa494f1478fde058202908060020a820491505090505b600063010000008416600f0b131561410e57608070010000000000b17217f7d20cf927c8e94c8202908060020a820491505090505b6000628000008416600f0b13156141425760807001000000000058b90bfbe8f71cb4e4b33d8202908060020a820491505090505b6000624000008416600f0b1315614176576080700100000000002c5c85fdf477b662b269458202908060020a820491505090505b6000622000008416600f0b13156141aa57608070010000000000162e42fefa3ae53369388c8202908060020a820491505090505b6000621000008416600f0b13156141de576080700100000000000b17217f7d1d351a389d408202908060020a820491505090505b6000620800008416600f0b131561421257608070010000000000058b90bfbe8e8b2d3d4ede8202908060020a820491505090505b6000620400008416600f0b13156142465760807001000000000002c5c85fdf4741bea6e77e8202908060020a820491505090505b6000620200008416600f0b131561427a576080700100000000000162e42fefa39fe95583c28202908060020a820491505090505b6000620100008416600f0b13156142ae5760807001000000000000b17217f7d1cfb72b45e18202908060020a820491505090505b60006180008416600f0b13156142e1576080700100000000000058b90bfbe8e7cc35c3f08202908060020a820491505090505b60006140008416600f0b131561431457608070010000000000002c5c85fdf473e242ea388202908060020a820491505090505b60006120008416600f0b13156143475760807001000000000000162e42fefa39f02b772c8202908060020a820491505090505b60006110008416600f0b131561437a57608070010000000000000b17217f7d1cf7d83c1a8202908060020a820491505090505b60006108008416600f0b13156143ad5760807001000000000000058b90bfbe8e7bdcbe2e8202908060020a820491505090505b60006104008416600f0b13156143e0576080700100000000000002c5c85fdf473dea871f8202908060020a820491505090505b60006102008416600f0b131561441357608070010000000000000162e42fefa39ef44d918202908060020a820491505090505b60006101008416600f0b1315614446576080700100000000000000b17217f7d1cf79e9498202908060020a820491505090505b600060808416600f0b131561447857608070010000000000000058b90bfbe8e7bce5448202908060020a820491505090505b600060408416600f0b13156144aa5760807001000000000000002c5c85fdf473de6eca8202908060020a820491505090505b600060208416600f0b13156144dc576080700100000000000000162e42fefa39ef366f8202908060020a820491505090505b600060108416600f0b131561450e5760807001000000000000000b17217f7d1cf79afa8202908060020a820491505090505b600060088416600f0b1315614540576080700100000000000000058b90bfbe8e7bcd6d8202908060020a820491505090505b600060048416600f0b131561457257608070010000000000000002c5c85fdf473de6b28202908060020a820491505090505b600060028416600f0b13156145a45760807001000000000000000162e42fefa39ef3588202908060020a820491505090505b600060018416600f0b13156145d657608070010000000000000000b17217f7d1cf79ab8202908060020a820491505090505b604083600f0b9060008212600003808260020a828518041892505050603f03600f0b81908060020a820491505090506f7fffffffffffffffffffffffffffffff600f0b81111561462557600080fd5b809150505b919050565b6040518060600160405280600063ffffffff168152602001600068ffffffffffffffffff168152602001600067ffffffffffffffff1681525090565b6000604051905090565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6146af8161467a565b81146146ba57600080fd5b50565b6000813590506146cc816146a6565b92915050565b6000602082840312156146e8576146e7614675565b5b60006146f6848285016146bd565b91505092915050565b60008115159050919050565b614714816146ff565b82525050565b600060208201905061472f600083018461470b565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561476f578082015181840152602081019050614754565b60008484015250505050565b6000601f19601f8301169050919050565b600061479782614735565b6147a18185614740565b93506147b1818560208601614751565b6147ba8161477b565b840191505092915050565b600060208201905081810360008301526147df818461478c565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000614812826147e7565b9050919050565b61482281614807565b811461482d57600080fd5b50565b60008135905061483f81614819565b92915050565b6000819050919050565b61485881614845565b811461486357600080fd5b50565b6000813590506148758161484f565b92915050565b6000806040838503121561489257614891614675565b5b60006148a085828601614830565b92505060206148b185828601614866565b9150509250929050565b600081600f0b9050919050565b6148d1816148bb565b82525050565b60006020820190506148ec60008301846148c8565b92915050565b6148fb816148bb565b811461490657600080fd5b50565b600081359050614918816148f2565b92915050565b6000806040838503121561493557614934614675565b5b600061494385828601614866565b925050602061495485828601614909565b9150509250929050565b61496781614845565b82525050565b6000602082019050614982600083018461495e565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6149c58261477b565b810181811067ffffffffffffffff821117156149e4576149e361498d565b5b80604052505050565b60006149f761466b565b9050614a0382826149bc565b919050565b600063ffffffff82169050919050565b614a2181614a08565b8114614a2c57600080fd5b50565b600081359050614a3e81614a18565b92915050565b600068ffffffffffffffffff82169050919050565b614a6281614a44565b8114614a6d57600080fd5b50565b600081359050614a7f81614a59565b92915050565b600067ffffffffffffffff82169050919050565b614aa281614a85565b8114614aad57600080fd5b50565b600081359050614abf81614a99565b92915050565b600060608284031215614adb57614ada614988565b5b614ae560606149ed565b90506000614af584828501614a2f565b6000830152506020614b0984828501614a70565b6020830152506040614b1d84828501614ab0565b60408301525092915050565b600060608284031215614b3f57614b3e614675565b5b6000614b4d84828501614ac5565b91505092915050565b600080600060608486031215614b6f57614b6e614675565b5b6000614b7d86828701614830565b9350506020614b8e86828701614830565b9250506040614b9f86828701614866565b9150509250925092565b600060208284031215614bbf57614bbe614675565b5b6000614bcd84828501614866565b91505092915050565b600060208284031215614bec57614beb614675565b5b6000614bfa84828501614830565b91505092915050565b60008060408385031215614c1a57614c19614675565b5b6000614c2885828601614866565b9250506020614c3985828601614866565b9150509250929050565b614c4c81614a08565b82525050565b614c5b81614a44565b82525050565b614c6a81614a85565b82525050565b6000606082019050614c856000830186614c43565b614c926020830185614c52565b614c9f6040830184614c61565b949350505050565b600060ff82169050919050565b614cbd81614ca7565b82525050565b6000602082019050614cd86000830184614cb4565b92915050565b614ce781614807565b82525050565b6000602082019050614d026000830184614cde565b92915050565b60008060008060808587031215614d2257614d21614675565b5b6000614d3087828801614866565b9450506020614d4187828801614909565b9350506040614d5287828801614866565b9250506060614d6387828801614866565b91505092959194509250565b614d7881614a08565b82525050565b614d8781614a44565b82525050565b614d9681614a85565b82525050565b606082016000820151614db26000850182614d6f565b506020820151614dc56020850182614d7e565b506040820151614dd86040850182614d8d565b50505050565b6000606082019050614df36000830184614d9c565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b614e1e81614df9565b82525050565b6000602082019050614e396000830184614e15565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680614e8657607f821691505b602082108103614e9957614e98614e3f565b5b50919050565b7f4558504952454400000000000000000000000000000000000000000000000000600082015250565b6000614ed5600783614740565b9150614ee082614e9f565b602082019050919050565b60006020820190508181036000830152614f0481614ec8565b9050919050565b7f5a45524f5f464952535400000000000000000000000000000000000000000000600082015250565b6000614f41600a83614740565b9150614f4c82614f0b565b602082019050919050565b60006020820190508181036000830152614f7081614f34565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614fb182614845565b9150614fbc83614845565b9250828203905081811115614fd457614fd3614f77565b5b92915050565b6000614fe582614845565b9150614ff083614845565b925082820190508082111561500857615007614f77565b5b92915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b6000615044600a83614740565b915061504f8261500e565b602082019050919050565b6000602082019050818103600083015261507381615037565b9050919050565b600061508582614845565b915061509083614845565b925082820261509e81614845565b915082820484148315176150b5576150b4614f77565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006150f682614845565b915061510183614845565b925082615111576151106150bc565b5b828204905092915050565b7f4552525f494e56414c49445f5354415445000000000000000000000000000000600082015250565b6000615152601183614740565b915061515d8261511c565b602082019050919050565b6000602082019050818103600083015261518181615145565b9050919050565b7f4552525f414c52454144595f4c4f434b45440000000000000000000000000000600082015250565b60006151be601283614740565b91506151c982615188565b602082019050919050565b600060208201905081810360008301526151ed816151b1565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b6000615259600d83614740565b915061526482615223565b602082019050919050565b600060208201905081810360008301526152888161524c565b9050919050565b61529881614df9565b81146152a357600080fd5b50565b6000815190506152b58161528f565b92915050565b6000602082840312156152d1576152d0614675565b5b60006152df848285016152a6565b9150509291505056fea2646970667358221220d5408287c06e54da7f8dc7cae17f7195a3e73269d5dd5fa683fc25dee0cafca364736f6c63430008110033 +\ No newline at end of file diff --git a/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.json b/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.json @@ -1 +1 @@ -[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"int128","name":"_taxLevel","type":"int128"},{"internalType":"uint256","name":"_periodMinutes","type":"uint256"},{"internalType":"address","name":"_defaultSinkAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_burner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int128","name":"_foo","type":"int128"},{"indexed":true,"internalType":"uint256","name":"_bar","type":"uint256"}],"name":"Debug","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_period","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_periodCount","type":"uint256"},{"indexed":true,"internalType":"int128","name":"_oldAmount","type":"int128"},{"indexed":false,"internalType":"int128","name":"_newAmount","type":"int128"}],"name":"Decayed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"Expired","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":false,"internalType":"uint256","name":"_sealState","type":"uint256"}],"name":"SealStateChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"actualPeriod","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"applyDemurrage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rounds","type":"uint256"}],"name":"applyDemurrageLimited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"applyExpiry","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"baseBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"changePeriod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"decayBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"demurrageAmount","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_target","type":"uint256"}],"name":"demurrageCycles","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"demurrageTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"},{"internalType":"int128","name":"_demurrageAmount","type":"int128"}],"name":"getDistribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"getDistributionFromRedistribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lastTimestamp","type":"uint256"}],"name":"getMinutesDelta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_periodCount","type":"uint256"}],"name":"getPeriodTimeDelta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"isEmptyRedistribution","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"isSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redistributionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"redistributions","outputs":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"seal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_expirePeriod","type":"uint256"}],"name":"setExpirePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sinkAddress","type":"address"}],"name":"setSinkAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sinkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxLevel","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"toBaseAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_participants","type":"uint256"},{"internalType":"int128","name":"_demurrageModifier","type":"int128"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"toRedistribution","outputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"toRedistributionDemurrageModifier","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"toRedistributionPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"toRedistributionSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSink","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] +[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"int128","name":"_taxLevel","type":"int128"},{"internalType":"uint256","name":"_periodMinutes","type":"uint256"},{"internalType":"address","name":"_defaultSinkAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_burner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_oldCap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newCap","type":"uint256"}],"name":"Cap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int128","name":"_foo","type":"int128"},{"indexed":true,"internalType":"uint256","name":"_bar","type":"uint256"}],"name":"Debug","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_period","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_periodCount","type":"uint256"},{"indexed":true,"internalType":"int128","name":"_oldAmount","type":"int128"},{"indexed":false,"internalType":"int128","name":"_newAmount","type":"int128"}],"name":"Decayed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"Expired","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":false,"internalType":"uint256","name":"_sealState","type":"uint256"}],"name":"SealStateChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"actualPeriod","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"applyDemurrage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rounds","type":"uint256"}],"name":"applyDemurrageLimited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"applyExpiry","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"baseBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"changePeriod","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"decayBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"demurrageAmount","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_target","type":"uint256"}],"name":"demurrageCycles","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"demurrageTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"},{"internalType":"int128","name":"_demurrageAmount","type":"int128"}],"name":"getDistribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"getDistributionFromRedistribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lastTimestamp","type":"uint256"}],"name":"getMinutesDelta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_periodCount","type":"uint256"}],"name":"getPeriodTimeDelta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"isEmptyRedistribution","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"isSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redistributionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"redistributions","outputs":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"seal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealState","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_expirePeriod","type":"uint256"}],"name":"setExpirePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cap","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sinkAddress","type":"address"}],"name":"setSinkAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sinkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_sum","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxLevel","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"toBaseAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_participants","type":"uint256"},{"internalType":"int128","name":"_demurrageModifier","type":"int128"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"toRedistribution","outputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"toRedistributionDemurrageModifier","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"toRedistributionPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"period","type":"uint32"},{"internalType":"uint72","name":"value","type":"uint72"},{"internalType":"uint64","name":"demurrage","type":"uint64"}],"internalType":"struct DemurrageTokenSingleCap.redistributionItem","name":"_redistribution","type":"tuple"}],"name":"toRedistributionSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSink","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] diff --git a/python/erc20_demurrage_token/token.py b/python/erc20_demurrage_token/token.py @@ -77,16 +77,8 @@ class DemurrageToken(ERC20, SealedContract, ExpiryContract): __abi = {} __bytecode = {} - valid_modes = [ - 'MultiNocap', - 'SingleNocap', - 'MultiCap', - 'SingleCap', - ] - - def constructor(self, sender_address, settings, cap=0, tx_format=TxFormat.JSONRPC): - if int(cap) < 0: - raise ValueError('cap must be 0 or positive integer') + + def constructor(self, sender_address, settings, tx_format=TxFormat.JSONRPC): code = DemurrageToken.bytecode() enc = ABIContractEncoder() enc.string(settings.name) @@ -95,8 +87,6 @@ class DemurrageToken(ERC20, SealedContract, ExpiryContract): enc.uint256(settings.demurrage_level) enc.uint256(settings.period_minutes) enc.address(settings.sink_address) - if cap > 0: - enc.uint256(cap) code += enc.get() tx = self.template(sender_address, None, use_nonce=True) tx = self.set_code(tx, code) @@ -109,23 +99,7 @@ class DemurrageToken(ERC20, SealedContract, ExpiryContract): @staticmethod - def __to_contract_name(multi, cap): - name = 'DemurrageToken' - if multi: - name += 'Multi' - else: - name += 'Single' - if cap: - name += 'Cap' - else: - name += 'Nocap' - logg.debug('bytecode name {}'.format(name)) - return name - - - @staticmethod - def abi(multi=True, cap=False): - #name = DemurrageToken.__to_contract_name(multi, cap) + def abi(multi=True): name = 'DemurrageTokenSingleNocap' if DemurrageToken.__abi.get(name) == None: f = open(os.path.join(data_dir, name + '.json'), 'r') @@ -135,8 +109,7 @@ class DemurrageToken(ERC20, SealedContract, ExpiryContract): @staticmethod - def bytecode(multi=True, cap=False): - #name = DemurrageToken.__to_contract_name(multi, cap) + def bytecode(multi=True): name = 'DemurrageTokenSingleNocap' if DemurrageToken.__bytecode.get(name) == None: f = open(os.path.join(data_dir, name + '.bin'), 'r') @@ -185,6 +158,17 @@ class DemurrageToken(ERC20, SealedContract, ExpiryContract): return tx + def set_max_supply(self, contract_address, sender_address, cap, tx_format=TxFormat.JSONRPC): + enc = ABIContractEncoder() + enc.method('setMaxSupply') + enc.typ(ABIContractType.UINT256) + enc.uint256(cap) + data = enc.get() + tx = self.template(sender_address, contract_address, use_nonce=True) + tx = self.set_code(tx, data) + tx = self.finalize(tx, tx_format) + return tx + def remove_minter(self, contract_address, sender_address, address, tx_format=TxFormat.JSONRPC): enc = ABIContractEncoder() enc.method('removeMinter') @@ -503,8 +487,8 @@ class DemurrageToken(ERC20, SealedContract, ExpiryContract): return self.call_noarg('demurrageTimestamp', contract_address, sender_address=sender_address) - def supply_cap(self, contract_address, sender_address=ZERO_ADDRESS): - return self.call_noarg('supplyCap', contract_address, sender_address=sender_address) + def max_supply(self, contract_address, sender_address=ZERO_ADDRESS): + return self.call_noarg('maxSupply', contract_address, sender_address=sender_address) # def grow_by(self, contract_address, value, period, sender_address=ZERO_ADDRESS, id_generator=None): diff --git a/python/erc20_demurrage_token/unittest/base.py b/python/erc20_demurrage_token/unittest/base.py @@ -34,7 +34,7 @@ PERIOD = 43200 class TestTokenDeploy: """tax level is ppm, 1000000 = 100%""" - def __init__(self, rpc, token_symbol='FOO', token_name='Foo Token', sink_address=ZERO_ADDRESS, supply=10**12, tax_level=TAX_LEVEL, period=PERIOD): + def __init__(self, rpc, token_symbol='FOO', token_name='Foo Token', sink_address=ZERO_ADDRESS, tax_level=TAX_LEVEL, period=PERIOD): self.tax_level = tax_level self.period_seconds = period * 60 @@ -60,14 +60,11 @@ class TestTokenDeploy: except TypeError: self.start_time = int(r['timestamp']) - self.default_supply = supply - self.default_supply_cap = 0 - def deploy(self, rpc, deployer_address, interface, supply_cap=0): tx_hash = None o = None - (tx_hash, o) = interface.constructor(deployer_address, self.settings, cap=0) + (tx_hash, o) = interface.constructor(deployer_address, self.settings) r = rpc.do(o) o = receipt(tx_hash) @@ -93,8 +90,8 @@ class TestDemurrage(EthTesterCase): except AttributeError as e: pass self.deployer = TestTokenDeploy(self.rpc, period=period, sink_address=self.accounts[9]) - self.default_supply = self.deployer.default_supply - self.default_supply_cap = self.deployer.default_supply_cap + self.default_supply = 0 + self.default_supply_cap = 0 self.start_block = None self.address = None self.start_time = None @@ -148,3 +145,6 @@ class TestDemurrageDefault(TestDemurrage): c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) self.deploy(c) + + self.default_supply = 10**12 + self.default_supply_cap = self.default_supply diff --git a/python/run_tests.sh b/python/run_tests.sh @@ -41,6 +41,7 @@ done python tests/test_expiry.py python tests/test_seal.py +python tests/test_cap.py set +e set +x diff --git a/python/tests/test_cap.py b/python/tests/test_cap.py @@ -18,7 +18,7 @@ from hexathon import ( from erc20_demurrage_token import DemurrageToken # test imports -from erc20_demurrage_token.unittest.base import TestDemurrageCap +from erc20_demurrage_token.unittest import TestDemurrageDefault logging.basicConfig(level=logging.DEBUG) logg = logging.getLogger() @@ -26,18 +26,27 @@ logg = logging.getLogger() testdir = os.path.dirname(__file__) -class TestCap(TestDemurrageCap): +class TestCap(TestDemurrageDefault): - def test_cap_set(self): + def test_cap(self): nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) - o = c.supply_cap(self.address, sender_address=self.accounts[0]) + + o = c.total_supply(self.address, sender_address=self.accounts[0]) + r = self.rpc.do(o) + logg.debug('r {}'.format(r)) + + (tx_hash, o) = c.set_max_supply(self.address, self.accounts[0], self.default_supply_cap) + r = self.rpc.do(o) + o = receipt(tx_hash) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + o = c.max_supply(self.address, sender_address=self.accounts[0]) r = self.rpc.do(o) cap = c.parse_supply_cap(r) self.assertEqual(cap, self.default_supply_cap) - - def test_cap(self): nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) (tx_hash, o) = c.mint_to(self.address, self.accounts[0], self.accounts[1], self.default_supply_cap) @@ -53,15 +62,5 @@ class TestCap(TestDemurrageCap): self.assertEqual(r['status'], 0) - def test_cap_first(self): - nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) - c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) - (tx_hash, o) = c.mint_to(self.address, self.accounts[0], self.accounts[1], self.default_supply_cap + 1) - r = self.rpc.do(o) - o = receipt(tx_hash) - r = self.rpc.do(o) - self.assertEqual(r['status'], 0) - - if __name__ == '__main__': unittest.main() diff --git a/python/tests/test_seal.py b/python/tests/test_seal.py @@ -156,6 +156,37 @@ class TestSeal(TestDemurrageDefault): self.assertTrue(c.parse_is_sealed(r)) + def test_seal_cap(self): + nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) + c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + + (tx_hash, o) = c.set_max_supply(self.address, self.accounts[0], 100) + r = self.rpc.do(o) + o = receipt(tx_hash) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + (tx_hash, o) = c.set_max_supply(self.address, self.accounts[0], 200) + r = self.rpc.do(o) + o = receipt(tx_hash) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + (tx_hash, o) = c.seal(self.address, self.accounts[0], ContractState.CAP_STATE) + r = self.rpc.do(o) + o = receipt(tx_hash) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + (tx_hash, o) = c.set_max_supply(self.address, self.accounts[0], 300) + r = self.rpc.do(o) + o = receipt(tx_hash) + r = self.rpc.do(o) + self.assertEqual(r['status'], 0) + + o = c.is_sealed(self.address, ContractState.CAP_STATE, sender_address=self.accounts[0]) + r = self.rpc.do(o) + self.assertTrue(c.parse_is_sealed(r)) if __name__ == '__main__': diff --git a/solidity/DemurrageTokenSingleNocap.sol b/solidity/DemurrageTokenSingleNocap.sol @@ -84,6 +84,9 @@ contract DemurrageTokenSingleCap { uint256 public expires; bool expired; + // supply xap + uint256 public maxSupply; + // Implements ERC20 event Transfer(address indexed _from, address indexed _to, uint256 _value); @@ -116,6 +119,8 @@ contract DemurrageTokenSingleCap { event Expired(uint256 _timestamp); + event Cap(uint256 indexed _oldCap, uint256 _newCap); + // property sealing uint256 public sealState; uint8 constant MINTER_STATE = 1; @@ -171,10 +176,22 @@ contract DemurrageTokenSingleCap { } function setExpirePeriod(uint256 _expirePeriod) public { + uint256 r; + require(!isSealed(EXPIRY_STATE)); require(!expired); require(msg.sender == owner); - expires = periodStart + (_expirePeriod * periodDuration); + r = periodStart + (_expirePeriod * periodDuration); + require(r > expires); + expires = r; + } + + function setMaxSupply(uint256 _cap) public { + require(!isSealed(CAP_STATE)); + require(msg.sender == owner); + require(_cap > supply); + emit Cap(maxSupply, _cap); + maxSupply = _cap; } @@ -283,10 +300,13 @@ contract DemurrageTokenSingleCap { require(applyExpiry() == 0); require(minter[msg.sender], 'ERR_ACCESS'); +changePeriod(); + if (maxSupply > 0) { + require(supply + _amount <= maxSupply); + } + supply += _amount; - changePeriod(); baseAmount = toBaseAmount(_amount); - supply += _amount; increaseBaseBalance(_beneficiary, baseAmount); emit Mint(msg.sender, _beneficiary, _amount); saveRedistributionSupply();