From 5317573b4713e154c2233e841917e41868b83bda Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 10 Feb 2023 09:06:04 +0000 Subject: [PATCH] All tests pass! --- .../data/DemurrageTokenSingleNocap.bin | 2 +- python/tests/test_growth.py | 18 +++++ python/tests/test_period.py | 68 +++++++++++++++---- python/tests/test_redistribution_single.py | 25 ++++--- solidity/DemurrageTokenSingleNocap.sol | 10 +-- 5 files changed, 97 insertions(+), 26 deletions(-) diff --git a/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.bin b/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.bin index da318e5..aa23994 100644 --- a/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.bin +++ b/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap.bin @@ -1 +1 @@ -60c06040523480156200001157600080fd5b506040516200580638038062005806833981810160405281019062000037919062000909565b6801000000000000000083600f0b126200005057600080fd5b6200005a6200061e565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600e6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550866006908162000126919062000c2a565b50856007908162000138919062000c2a565b508460ff166008819055504260038190555060035460808181525050603c8362000163919062000d40565b60a081815250506200018a60016200034f6401000000000262002581176401000000009004565b600260006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550620001e4846200037664010000000002620025a7176401000000009004565b600d60006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff1602179055506200024e6000600260009054906101000a9004600f0b60006001620003ca640100000000026401000000009004565b90506000819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550505081601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000d8b565b6000677fffffffffffffff8211156200036757600080fd5b6040829060020a029050919050565b60008082600f0b136200038857600080fd5b60806fb17217f7d1cf79abc9e3b39803f2f6af620003b5846200044e640100000000026401000000009004565b600f0b02908060020a82049150509050919050565b620003d46200061e565b620003de6200061e565b82816000019063ffffffff16908163ffffffff168152505083816020019068ffffffffffffffffff16908168ffffffffffffffffff168152505067ffffffffffffffff8516816040019067ffffffffffffffff16908167ffffffffffffffff168152505080915050949350505050565b60008082600f0b136200046057600080fd5b60008083600f0b90506801000000000000000081126200049c576040819060008212600003808260020a82851804189250505090506040820191505b6401000000008112620004cb576020819060008212600003808260020a82851804189250505090506020820191505b620100008112620004f8576010819060008212600003808260020a82851804189250505090506010820191505b610100811262000524576008819060008212600003808260020a82851804189250505090506008820191505b601081126200054f576004819060008212600003808260020a82851804189250505090506004820191505b600481126200057a576002819060008212600003808260020a82851804189250505090506002820191505b600281126200058a576001820191505b600060408084039060020a029050600083607f0386600f0b9060020a029050600067800000000000000090505b600081131562000611578182029150600060ff83908060020a8204915050905080607f0183908060020a8204915050925080820284019350506001819060008212600003808260020a8285180418925050509050620005b7565b5081945050505050919050565b6040518060600160405280600063ffffffff168152602001600068ffffffffffffffffff168152602001600067ffffffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620006c38262000678565b810181811067ffffffffffffffff82111715620006e557620006e462000689565b5b80604052505050565b6000620006fa6200065a565b9050620007088282620006b8565b919050565b600067ffffffffffffffff8211156200072b576200072a62000689565b5b620007368262000678565b9050602081019050919050565b60005b838110156200076357808201518184015260208101905062000746565b60008484015250505050565b60006200078662000780846200070d565b620006ee565b905082815260208101848484011115620007a557620007a462000673565b5b620007b284828562000743565b509392505050565b600082601f830112620007d257620007d16200066e565b5b8151620007e48482602086016200076f565b91505092915050565b600060ff82169050919050565b6200080581620007ed565b81146200081157600080fd5b50565b6000815190506200082581620007fa565b92915050565b600081600f0b9050919050565b62000843816200082b565b81146200084f57600080fd5b50565b600081519050620008638162000838565b92915050565b6000819050919050565b6200087e8162000869565b81146200088a57600080fd5b50565b6000815190506200089e8162000873565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620008d182620008a4565b9050919050565b620008e381620008c4565b8114620008ef57600080fd5b50565b6000815190506200090381620008d8565b92915050565b60008060008060008060c0878903121562000929576200092862000664565b5b600087015167ffffffffffffffff8111156200094a576200094962000669565b5b6200095889828a01620007ba565b965050602087015167ffffffffffffffff8111156200097c576200097b62000669565b5b6200098a89828a01620007ba565b95505060406200099d89828a0162000814565b9450506060620009b089828a0162000852565b9350506080620009c389828a016200088d565b92505060a0620009d689828a01620008f2565b9150509295509295509295565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062000a3657607f821691505b60208210810362000a4c5762000a4b620009ee565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b60006008830262000ab97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000a77565b62000ac5868362000a77565b95508019841693508086168417925050509392505050565b6000819050919050565b600062000b0862000b0262000afc8462000869565b62000add565b62000869565b9050919050565b6000819050919050565b62000b248362000ae7565b62000b3c62000b338262000b0f565b84845462000a87565b825550505050565b600090565b62000b5362000b44565b62000b6081848462000b19565b505050565b5b8181101562000b885762000b7c60008262000b49565b60018101905062000b66565b5050565b601f82111562000bd75762000ba18162000a52565b62000bac8462000a67565b8101602085101562000bbc578190505b62000bd462000bcb8562000a67565b83018262000b65565b50505b505050565b60008160020a8304905092915050565b600062000bff6000198460080262000bdc565b1980831691505092915050565b600062000c1a838362000bec565b9150826002028217905092915050565b62000c3582620009e3565b67ffffffffffffffff81111562000c515762000c5062000689565b5b62000c5d825462000a1d565b62000c6a82828562000b8c565b600060209050601f83116001811462000ca2576000841562000c8d578287015190505b62000c99858262000c0c565b86555062000d09565b601f19841662000cb28662000a52565b60005b8281101562000cdc5784890151825560018201915060208501945060208101905062000cb5565b8683101562000cfc578489015162000cf8601f89168262000bec565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000d4d8262000869565b915062000d5a8362000869565b925082820262000d6a8162000869565b9150828204841483151762000d845762000d8362000d11565b5b5092915050565b60805160a051614a3262000dd46000396000818161175a01528181611cb90152818161223701526124570152600081816117860152818161247801526124bd0152614a326000f3fe608060405234801561001057600080fd5b50600436106102bd576000357c0100000000000000000000000000000000000000000000000000000000900480636a2d094e11610184578063983b2d56116100eb578063d89135cd116100a4578063d89135cd1461094a578063e54063a614610968578063e69571af14610998578063e8095295146109c8578063eda4e6d6146109e6578063f2fde38b14610a04576102bd565b8063983b2d561461084e578063a457c2d71461087e578063a9059cbb146108ae578063b470aade146108de578063c0ab7077146108fc578063d340ef8a1461092c576102bd565b806379ba50971161013d57806379ba50971461079c57806384dde4af146107ba5780638da5cb5b146107d85780638f0b2d5d146107f65780638f1df6bc1461081257806395d89b4114610830576102bd565b80636a2d094e146106b257806370a08231146106e2578063731f237c1461071257806373f42561146107305780637445e33a1461074e57806374bedb951461077e576102bd565b80633092afd511610228578063449a52f8116101e1578063449a52f8146105a457806347a50517146105d45780634abfbba21461060457806351b4541c1461063457806358b2833b146106645780636787a9be14610682576102bd565b80633092afd5146104a857806331333487146104d8578063313ce56714610508578063395093511461052657806340452d911461055657806342966c6814610588576102bd565b80631989c6a81161027a5780631989c6a8146103ac578063213d1e1e146103ca578063229ba197146103fa57806323a859441461041857806323b872dd146104485780632a7aec0914610478576102bd565b806301ffc9a7146102c257806306fdde03146102f2578063095ea7b31461031057806309f28f3c1461034057806311c566151461035e57806318160ddd1461038e575b600080fd5b6102dc60048036038101906102d79190613ef9565b610a34565b6040516102e99190613f41565b60405180910390f35b6102fa610bda565b6040516103079190613fec565b60405180910390f35b61032a600480360381019061032591906140a2565b610c68565b6040516103379190613f41565b60405180910390f35b610348610e39565b60405161035591906140fe565b60405180910390f35b61037860048036038101906103739190614145565b610e4c565b6040516103859190614194565b60405180910390f35b610396610e9c565b6040516103a39190614194565b60405180910390f35b6103b4610eb3565b6040516103c19190614194565b60405180910390f35b6103e460048036038101906103df9190614350565b610ebf565b6040516103f19190614194565b60405180910390f35b610402610ed8565b60405161040f91906140fe565b60405180910390f35b610432600480360381019061042d9190614350565b610eeb565b60405161043f9190613f41565b60405180910390f35b610462600480360381019061045d919061437d565b610f53565b60405161046f9190613f41565b60405180910390f35b610492600480360381019061048d9190614350565b611106565b60405161049f91906140fe565b60405180910390f35b6104c260048036038101906104bd91906143d0565b61113e565b6040516104cf9190613f41565b60405180910390f35b6104f260048036038101906104ed91906143fd565b611231565b6040516104ff9190614194565b60405180910390f35b61051061129d565b60405161051d9190614194565b60405180910390f35b610540600480360381019061053b91906140a2565b6112a3565b60405161054d9190613f41565b60405180910390f35b610570600480360381019061056b919061443d565b611439565b60405161057f93929190614497565b60405180910390f35b6105a2600480360381019061059d919061443d565b6114a8565b005b6105be60048036038101906105b991906140a2565b6115cd565b6040516105cb9190613f41565b60405180910390f35b6105ee60048036038101906105e991906143d0565b61170d565b6040516105fb9190614194565b60405180910390f35b61061e6004803603810190610619919061443d565b611756565b60405161062b9190614194565b60405180910390f35b61064e6004803603810190610649919061443d565b6117b6565b60405161065b9190614194565b60405180910390f35b61066c6117d7565b6040516106799190614194565b60405180910390f35b61069c6004803603810190610697919061443d565b6117dd565b6040516106a99190614194565b60405180910390f35b6106cc60048036038101906106c7919061443d565b61181e565b6040516106d99190614194565b60405180910390f35b6106fc60048036038101906106f791906143d0565b61183f565b6040516107099190614194565b60405180910390f35b61071a6118a6565b6040516107279190614194565b60405180910390f35b6107386118b7565b6040516107459190614194565b60405180910390f35b61076860048036038101906107639190614350565b6118bd565b6040516107759190614194565b60405180910390f35b6107866118eb565b6040516107939190614194565b60405180910390f35b6107a46118f1565b6040516107b19190613f41565b60405180910390f35b6107c2611a98565b6040516107cf91906144dd565b60405180910390f35b6107e0611abe565b6040516107ed91906144dd565b60405180910390f35b610810600480360381019061080b91906143d0565b611ae4565b005b61081a611b82565b6040516108279190613f41565b60405180910390f35b610838611e35565b6040516108459190613fec565b60405180910390f35b610868600480360381019061086391906143d0565b611ec3565b6040516108759190613f41565b60405180910390f35b610898600480360381019061089391906140a2565b611f80565b6040516108a59190613f41565b60405180910390f35b6108c860048036038101906108c391906140a2565b61219f565b6040516108d59190613f41565b60405180910390f35b6108e6612235565b6040516108f39190614194565b60405180910390f35b6109166004803603810190610911919061443d565b612259565b6040516109239190614194565b60405180910390f35b6109346123ad565b6040516109419190614194565b60405180910390f35b6109526123b3565b60405161095f9190614194565b60405180910390f35b610982600480360381019061097d9190614350565b6123bd565b60405161098f9190614194565b60405180910390f35b6109b260048036038101906109ad91906144f8565b6123d1565b6040516109bf91906145ce565b60405180910390f35b6109d0612451565b6040516109dd9190614614565b60405180910390f35b6109ee6124bb565b6040516109fb9190614194565b60405180910390f35b610a1e6004803603810190610a1991906143d0565b6124df565b604051610a2b9190613f41565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610a885760019050610bd5565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610ada5760019050610bd5565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610b2c5760019050610bd5565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610b7e5760019050610bd5565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610bd05760019050610bd5565b600090505b919050565b60068054610be79061465e565b80601f0160208091040260200160405190810160405280929190818152602001828054610c139061465e565b8015610c605780601f10610c3557610100808354040283529160200191610c60565b820191906000526020600020905b815481529060010190602001808311610c4357829003601f168201915b505050505081565b6000806000600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115610d345760008314610d33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2a906146db565b60405180910390fd5b5b610d3c611b82565b50610d46836117dd565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610e269190614194565b60405180910390a3600191505092915050565b600260009054906101000a9004600f0b81565b600080610e73610e5b85612581565b610e6e610e686001612581565b866125e9565b612650565b9050610e7e816126cf565b67ffffffffffffffff1684610e93919061472a565b91505092915050565b6000600c54600954610eae919061472a565b905090565b60008080549050905090565b6000816020015168ffffffffffffffffff169050919050565b600d60009054906101000a9004600f0b81565b600080826000015163ffffffff161115610f085760009050610f4e565b6000826020015168ffffffffffffffffff161115610f295760009050610f4e565b6000826040015167ffffffffffffffff161115610f495760009050610f4e565b600190505b919050565b6000806000610f60611b82565b50610f6a846117dd565b915081600f60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610ff557600080fd5b81600f60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611081919061472a565b92505081905550611093868684612704565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040516110f29190614194565b60405180910390a380925050509392505050565b60008067ffffffffffffffff836040015160070b169050600081600f0b03611135576111326001612581565b90505b80915050919050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806111c757503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b6111d057600080fd5b6000600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b60008060008061124086612581565b925061124b85612581565b9150611266600d60009054906101000a9004600f0b83612650565b905061127181612729565b905061127d8382612650565b9050611288816126cf565b67ffffffffffffffff16935050505092915050565b60085481565b6000806112ae611b82565b506112b8836117dd565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611346919061475e565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040516114269190614194565b60405180910390a3600191505092915050565b6000818154811061144957600080fd5b906000526020600020016000915090508060000160009054906101000a900463ffffffff16908060000160049054906101000a900468ffffffffffffffffff169080600001600d9054906101000a900467ffffffffffffffff16905083565b600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166114fe57600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481111561154a57600080fd5b6000611555826117dd565b905061156133826127b6565b5081600c6000828254611574919061475e565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040516115c19190614194565b60405180910390a25050565b600080600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661165c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611653906147de565b60405180910390fd5b611664611b82565b5061166e836117dd565b90508260096000828254611682919061475e565b9250508190555061169384826128bd565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516116f19190614194565b60405180910390a3611701612981565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f00000000000000000000000000000000000000000000000000000000000000008261178491906147fe565b7f00000000000000000000000000000000000000000000000000000000000000006117af919061475e565b9050919050565b6000603c82426117c6919061472a565b6117d0919061486f565b9050919050565b60035481565b6000806118016117ec84612581565b600260009054906101000a9004600f0b612b45565b905061180c816126cf565b67ffffffffffffffff16915050919050565b6000603c824261182e919061472a565b611838919061486f565b9050919050565b6000806000806118566118518661170d565b612581565b92506118636003546117b6565b905061187e83600260009054906101000a9004600f0b612650565b915061189c61188c836126cf565b67ffffffffffffffff1682611231565b9350505050919050565b60006118b26000612259565b905090565b600c5481565b60008060006118cb84610ebf565b91506118d684611106565b90506118e28282610e4c565b92505050919050565b600b5481565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461194e57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b3e57600080fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000611b8c613e56565b611b94613e56565b611b9c613e56565b6000806000806000611bac6118a6565b50611bb5612bd1565b9750611bc088610eeb565b15611bd657600098505050505050505050611e32565b6000600a5481548110611bec57611beb6148a0565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250509550611c99886123bd565b9450600185611ca8919061475e565b9050611cb386611106565b9350603c7f0000000000000000000000000000000000000000000000000000000000000000611ce2919061486f565b9150611d05600d60009054906101000a9004600f0b611d0084612581565b612650565b9250611d1083612729565b84611d1b91906148cf565b9250611d31600084611d2b610e9c565b846123d1565b96506000879080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505050611ded87612d67565b507f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d67581604051611e1d9190614194565b60405180910390a16001985050505050505050505b90565b60078054611e429061465e565b80601f0160208091040260200160405190810160405280929190818152602001828054611e6e9061465e565b8015611ebb5780601f10611e9057610100808354040283529160200191611ebb565b820191906000526020600020905b815481529060010190602001808311611e9e57829003601f168201915b505050505081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f1f57600080fd5b6001600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600080611f8c836117dd565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561201757600080fd5b61201f611b82565b5080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120ac919061472a565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460405161218c9190614194565b60405180910390a3600191505092915050565b60008060006121ac611b82565b506121b6846117dd565b91506121c3338684612704565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040516122229190614194565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080600080600061226c6003546117b6565b9250600083036122835760009450505050506123a8565b600260009054906101000a9004600f0b90506000861180156122a457508286105b156122ad578592505b6122b683612581565b91506122d1600d60009054906101000a9004600f0b83612650565b93506122dc84612729565b93506122f7600260009054906101000a9004600f0b85612650565b600260006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550603c8361233f91906147fe565b60035461234c919061475e565b60038190555080600f0b836003547f1c9c74563c32efd114cb36fb5e432d9386c8254d08456614804a33a3088ab736600260009054906101000a9004600f0b60405161239891906140fe565b60405180910390a4829450505050505b919050565b600a5481565b6000600c54905090565b6000816000015163ffffffff169050919050565b6123d9613e56565b6123e1613e56565b82816000019063ffffffff16908163ffffffff168152505083816020019068ffffffffffffffffff16908168ffffffffffffffffff168152505067ffffffffffffffff8516816040019067ffffffffffffffff16908167ffffffffffffffff168152505080915050949350505050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000426124a2919061472a565b6124ac919061486f565b6124b6919061475e565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461253b57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000677fffffffffffffff82111561259857600080fd5b6040829060020a029050919050565b60008082600f0b136125b857600080fd5b60806fb17217f7d1cf79abc9e3b39803f2f6af6125d484612e74565b600f0b02908060020a82049150509050919050565b60008082600f0b84600f0b0390507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b811215801561263d57506f7fffffffffffffffffffffffffffffff600f0b8113155b61264657600080fd5b8091505092915050565b600080604083600f0b85600f0b029060008212600003808260020a82851804189250505090507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b81121580156126bc57506f7fffffffffffffffffffffffffffffff600f0b8113155b6126c557600080fd5b8091505092915050565b60008082600f0b12156126e157600080fd5b604082600f0b9060008212600003808260020a8285180418925050509050919050565b60008061271185846127b6565b5061271c84846128bd565b5060019150509392505050565b60006840000000000000000082600f0b1261274357600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b121561277757600090506127b1565b6127ae6080700171547652b82fe1777d0ffda0d23a7d1284600f0b029060008212600003808260020a82851804189250505061303a565b90505b919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000850361281257600093505050506128b7565b61281b8661170d565b925084831015612860576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161285790614983565b60405180910390fd5b848361286c919061472a565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008503612919576000935050505061297b565b6129228661170d565b92508483612930919061475e565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b600061298b613e56565b6000612995610e9c565b9050600060016000805490506129ab919061472a565b815481106129bc576129bb6148a0565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681525050915080826020019068ffffffffffffffffff16908168ffffffffffffffffff16815250508160006001600080549050612a97919061472a565b81548110612aa857612aa76148a0565b5b9060005260206000200160008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555090505060019250505090565b60008082600f0b03612b5657600080fd5b600082600f0b604085600f0b9060020a0281612b7557612b74614840565b5b0590507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b8112158015612bbe57506f7fffffffffffffffffffffffffffffff600f0b8113155b612bc757600080fd5b8091505092915050565b612bd9613e56565b612be1613e56565b612be9613e56565b600080600a5481548110612c0057612bff6148a0565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152505092503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381865afa158015612d0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d2f91906149cf565b6fffffffffffffffffffffffffffffffff169050612d4c836123bd565b8111612d5d57819350505050612d64565b8293505050505b90565b6000806000612d75846118bd565b9150600b54612d83836117dd565b612d8d919061472a565b9050612dbb601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826128bd565b50836000015163ffffffff16601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f9a2a887706623ad3ff7fc85652deeceabe9fe1e00466c597972079ee91ea40d384604051612e2f9190614194565b60405180910390a36001600a6000828254612e4a919061475e565b9250508190555080600b6000828254612e63919061475e565b925050819055508192505050919050565b60008082600f0b13612e8557600080fd5b60008083600f0b9050680100000000000000008112612ec0576040819060008212600003808260020a82851804189250505090506040820191505b6401000000008112612eee576020819060008212600003808260020a82851804189250505090506020820191505b620100008112612f1a576010819060008212600003808260020a82851804189250505090506010820191505b6101008112612f45576008819060008212600003808260020a82851804189250505090506008820191505b60108112612f6f576004819060008212600003808260020a82851804189250505090506004820191505b60048112612f99576002819060008212600003808260020a82851804189250505090506002820191505b60028112612fa8576001820191505b600060408084039060020a029050600083607f0386600f0b9060020a029050600067800000000000000090505b600081131561302d578182029150600060ff83908060020a8204915050905080607f0183908060020a8204915050925080820284019350506001819060008212600003808260020a8285180418925050509050612fd5565b5081945050505050919050565b60006840000000000000000082600f0b1261305457600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b12156130885760009050613e51565b60006f80000000000000000000000000000000905060006780000000000000008416600f0b13156130d657608070016a09e667f3bcc908b2fb1366ea957d3e8202908060020a820491505090505b60006740000000000000008416600f0b131561310f5760807001306fe0a31b7152de8d5a46305c85edec8202908060020a820491505090505b60006720000000000000008416600f0b13156131485760807001172b83c7d517adcdf7c8c50eb14a791f8202908060020a820491505090505b60006710000000000000008416600f0b131561318157608070010b5586cf9890f6298b92b71842a983638202908060020a820491505090505b60006708000000000000008416600f0b13156131ba5760807001059b0d31585743ae7c548eb68ca417fd8202908060020a820491505090505b60006704000000000000008416600f0b13156131f3576080700102c9a3e778060ee6f7caca4f7a29bde88202908060020a820491505090505b60006702000000000000008416600f0b131561322c57608070010163da9fb33356d84a66ae336dcdfa3f8202908060020a820491505090505b60006701000000000000008416600f0b1315613265576080700100b1afa5abcbed6129ab13ec11dc95438202908060020a820491505090505b600066800000000000008416600f0b131561329d57608070010058c86da1c09ea1ff19d294cf2f679b8202908060020a820491505090505b600066400000000000008416600f0b13156132d55760807001002c605e2e8cec506d21bfc89a23a00f8202908060020a820491505090505b600066200000000000008416600f0b131561330d576080700100162f3904051fa128bca9c55c31e5df8202908060020a820491505090505b600066100000000000008416600f0b13156133455760807001000b175effdc76ba38e31671ca9397258202908060020a820491505090505b600066080000000000008416600f0b131561337d576080700100058ba01fb9f96d6cacd4b180917c3d8202908060020a820491505090505b600066040000000000008416600f0b13156133b557608070010002c5cc37da9491d0985c348c68e7b38202908060020a820491505090505b600066020000000000008416600f0b13156133ed5760807001000162e525ee054754457d59952920268202908060020a820491505090505b600066010000000000008416600f0b131561342557608070010000b17255775c040618bf4a4ade83fc8202908060020a820491505090505b6000658000000000008416600f0b131561345c5760807001000058b91b5bc9ae2eed81e9b7d4cfab8202908060020a820491505090505b6000654000000000008416600f0b1315613493576080700100002c5c89d5ec6ca4d7c8acc017b7c98202908060020a820491505090505b6000652000000000008416600f0b13156134ca57608070010000162e43f4f831060e02d839a9d16d8202908060020a820491505090505b6000651000000000008416600f0b1315613501576080700100000b1721bcfc99d9f890ea069117638202908060020a820491505090505b6000650800000000008416600f0b131561353857608070010000058b90cf1e6d97f9ca14dbcc16288202908060020a820491505090505b6000650400000000008416600f0b131561356f5760807001000002c5c863b73f016468f6bac5ca2b8202908060020a820491505090505b6000650200000000008416600f0b13156135a6576080700100000162e430e5a18f6119e3c02282a58202908060020a820491505090505b6000650100000000008416600f0b13156135dd5760807001000000b1721835514b86e6d96efd1bfe8202908060020a820491505090505b60006480000000008416600f0b1315613613576080700100000058b90c0b48c6be5df846c5b2ef8202908060020a820491505090505b60006440000000008416600f0b131561364957608070010000002c5c8601cc6b9e94213c72737a8202908060020a820491505090505b60006420000000008416600f0b131561367f5760807001000000162e42fff037df38aa2b219f068202908060020a820491505090505b60006410000000008416600f0b13156136b557608070010000000b17217fba9c739aa5819f44f98202908060020a820491505090505b60006408000000008416600f0b13156136eb5760807001000000058b90bfcdee5acd3c1cedc8238202908060020a820491505090505b60006404000000008416600f0b1315613721576080700100000002c5c85fe31f35a6a30da1be508202908060020a820491505090505b60006402000000008416600f0b131561375757608070010000000162e42ff0999ce3541b9fffcf8202908060020a820491505090505b60006401000000008416600f0b131561378d576080700100000000b17217f80f4ef5aadda455548202908060020a820491505090505b600063800000008416600f0b13156137c257608070010000000058b90bfbf8479bd5a81b51ad8202908060020a820491505090505b600063400000008416600f0b13156137f75760807001000000002c5c85fdf84bd62ae30a74cc8202908060020a820491505090505b600063200000008416600f0b131561382c576080700100000000162e42fefb2fed257559bdaa8202908060020a820491505090505b600063100000008416600f0b13156138615760807001000000000b17217f7d5a7716bba4a9ae8202908060020a820491505090505b600063080000008416600f0b1315613896576080700100000000058b90bfbe9ddbac5e109cce8202908060020a820491505090505b600063040000008416600f0b13156138cb57608070010000000002c5c85fdf4b15de6f17eb0d8202908060020a820491505090505b600063020000008416600f0b13156139005760807001000000000162e42fefa494f1478fde058202908060020a820491505090505b600063010000008416600f0b131561393557608070010000000000b17217f7d20cf927c8e94c8202908060020a820491505090505b6000628000008416600f0b13156139695760807001000000000058b90bfbe8f71cb4e4b33d8202908060020a820491505090505b6000624000008416600f0b131561399d576080700100000000002c5c85fdf477b662b269458202908060020a820491505090505b6000622000008416600f0b13156139d157608070010000000000162e42fefa3ae53369388c8202908060020a820491505090505b6000621000008416600f0b1315613a05576080700100000000000b17217f7d1d351a389d408202908060020a820491505090505b6000620800008416600f0b1315613a3957608070010000000000058b90bfbe8e8b2d3d4ede8202908060020a820491505090505b6000620400008416600f0b1315613a6d5760807001000000000002c5c85fdf4741bea6e77e8202908060020a820491505090505b6000620200008416600f0b1315613aa1576080700100000000000162e42fefa39fe95583c28202908060020a820491505090505b6000620100008416600f0b1315613ad55760807001000000000000b17217f7d1cfb72b45e18202908060020a820491505090505b60006180008416600f0b1315613b08576080700100000000000058b90bfbe8e7cc35c3f08202908060020a820491505090505b60006140008416600f0b1315613b3b57608070010000000000002c5c85fdf473e242ea388202908060020a820491505090505b60006120008416600f0b1315613b6e5760807001000000000000162e42fefa39f02b772c8202908060020a820491505090505b60006110008416600f0b1315613ba157608070010000000000000b17217f7d1cf7d83c1a8202908060020a820491505090505b60006108008416600f0b1315613bd45760807001000000000000058b90bfbe8e7bdcbe2e8202908060020a820491505090505b60006104008416600f0b1315613c07576080700100000000000002c5c85fdf473dea871f8202908060020a820491505090505b60006102008416600f0b1315613c3a57608070010000000000000162e42fefa39ef44d918202908060020a820491505090505b60006101008416600f0b1315613c6d576080700100000000000000b17217f7d1cf79e9498202908060020a820491505090505b600060808416600f0b1315613c9f57608070010000000000000058b90bfbe8e7bce5448202908060020a820491505090505b600060408416600f0b1315613cd15760807001000000000000002c5c85fdf473de6eca8202908060020a820491505090505b600060208416600f0b1315613d03576080700100000000000000162e42fefa39ef366f8202908060020a820491505090505b600060108416600f0b1315613d355760807001000000000000000b17217f7d1cf79afa8202908060020a820491505090505b600060088416600f0b1315613d67576080700100000000000000058b90bfbe8e7bcd6d8202908060020a820491505090505b600060048416600f0b1315613d9957608070010000000000000002c5c85fdf473de6b28202908060020a820491505090505b600060028416600f0b1315613dcb5760807001000000000000000162e42fefa39ef3588202908060020a820491505090505b600060018416600f0b1315613dfd57608070010000000000000000b17217f7d1cf79ab8202908060020a820491505090505b604083600f0b9060008212600003808260020a828518041892505050603f03600f0b81908060020a820491505090506f7fffffffffffffffffffffffffffffff600f0b811115613e4c57600080fd5b809150505b919050565b6040518060600160405280600063ffffffff168152602001600068ffffffffffffffffff168152602001600067ffffffffffffffff1681525090565b6000604051905090565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613ed681613ea1565b8114613ee157600080fd5b50565b600081359050613ef381613ecd565b92915050565b600060208284031215613f0f57613f0e613e9c565b5b6000613f1d84828501613ee4565b91505092915050565b60008115159050919050565b613f3b81613f26565b82525050565b6000602082019050613f566000830184613f32565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613f96578082015181840152602081019050613f7b565b60008484015250505050565b6000601f19601f8301169050919050565b6000613fbe82613f5c565b613fc88185613f67565b9350613fd8818560208601613f78565b613fe181613fa2565b840191505092915050565b600060208201905081810360008301526140068184613fb3565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006140398261400e565b9050919050565b6140498161402e565b811461405457600080fd5b50565b60008135905061406681614040565b92915050565b6000819050919050565b61407f8161406c565b811461408a57600080fd5b50565b60008135905061409c81614076565b92915050565b600080604083850312156140b9576140b8613e9c565b5b60006140c785828601614057565b92505060206140d88582860161408d565b9150509250929050565b600081600f0b9050919050565b6140f8816140e2565b82525050565b600060208201905061411360008301846140ef565b92915050565b614122816140e2565b811461412d57600080fd5b50565b60008135905061413f81614119565b92915050565b6000806040838503121561415c5761415b613e9c565b5b600061416a8582860161408d565b925050602061417b85828601614130565b9150509250929050565b61418e8161406c565b82525050565b60006020820190506141a96000830184614185565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6141ec82613fa2565b810181811067ffffffffffffffff8211171561420b5761420a6141b4565b5b80604052505050565b600061421e613e92565b905061422a82826141e3565b919050565b600063ffffffff82169050919050565b6142488161422f565b811461425357600080fd5b50565b6000813590506142658161423f565b92915050565b600068ffffffffffffffffff82169050919050565b6142898161426b565b811461429457600080fd5b50565b6000813590506142a681614280565b92915050565b600067ffffffffffffffff82169050919050565b6142c9816142ac565b81146142d457600080fd5b50565b6000813590506142e6816142c0565b92915050565b600060608284031215614302576143016141af565b5b61430c6060614214565b9050600061431c84828501614256565b600083015250602061433084828501614297565b6020830152506040614344848285016142d7565b60408301525092915050565b60006060828403121561436657614365613e9c565b5b6000614374848285016142ec565b91505092915050565b60008060006060848603121561439657614395613e9c565b5b60006143a486828701614057565b93505060206143b586828701614057565b92505060406143c68682870161408d565b9150509250925092565b6000602082840312156143e6576143e5613e9c565b5b60006143f484828501614057565b91505092915050565b6000806040838503121561441457614413613e9c565b5b60006144228582860161408d565b92505060206144338582860161408d565b9150509250929050565b60006020828403121561445357614452613e9c565b5b60006144618482850161408d565b91505092915050565b6144738161422f565b82525050565b6144828161426b565b82525050565b614491816142ac565b82525050565b60006060820190506144ac600083018661446a565b6144b96020830185614479565b6144c66040830184614488565b949350505050565b6144d78161402e565b82525050565b60006020820190506144f260008301846144ce565b92915050565b6000806000806080858703121561451257614511613e9c565b5b60006145208782880161408d565b945050602061453187828801614130565b93505060406145428782880161408d565b92505060606145538782880161408d565b91505092959194509250565b6145688161422f565b82525050565b6145778161426b565b82525050565b614586816142ac565b82525050565b6060820160008201516145a2600085018261455f565b5060208201516145b5602085018261456e565b5060408201516145c8604085018261457d565b50505050565b60006060820190506145e3600083018461458c565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61460e816145e9565b82525050565b60006020820190506146296000830184614605565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061467657607f821691505b6020821081036146895761468861462f565b5b50919050565b7f5a45524f5f464952535400000000000000000000000000000000000000000000600082015250565b60006146c5600a83613f67565b91506146d08261468f565b602082019050919050565b600060208201905081810360008301526146f4816146b8565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006147358261406c565b91506147408361406c565b9250828203905081811115614758576147576146fb565b5b92915050565b60006147698261406c565b91506147748361406c565b925082820190508082111561478c5761478b6146fb565b5b92915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b60006147c8600a83613f67565b91506147d382614792565b602082019050919050565b600060208201905081810360008301526147f7816147bb565b9050919050565b60006148098261406c565b91506148148361406c565b92508282026148228161406c565b91508282048414831517614839576148386146fb565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061487a8261406c565b91506148858361406c565b92508261489557614894614840565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006148da826140e2565b91506148e5836140e2565b925082820390506f7fffffffffffffffffffffffffffffff81137fffffffffffffffffffffffffffffffff8000000000000000000000000000000082121715614931576149306146fb565b5b92915050565b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b600061496d600d83613f67565b915061497882614937565b602082019050919050565b6000602082019050818103600083015261499c81614960565b9050919050565b6149ac816145e9565b81146149b757600080fd5b50565b6000815190506149c9816149a3565b92915050565b6000602082840312156149e5576149e4613e9c565b5b60006149f3848285016149ba565b9150509291505056fea2646970667358221220210942c9adc51a33335140be7e0c9e00222987d437835e159de8102de2abb8f064736f6c63430008110033 \ No newline at end of file +60c06040523480156200001157600080fd5b50604051620057ad380380620057ad833981810160405281019062000037919062000909565b6801000000000000000083600f0b126200005057600080fd5b6200005a6200061e565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600e6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550866006908162000126919062000c2a565b50856007908162000138919062000c2a565b508460ff166008819055504260038190555060035460808181525050603c8362000163919062000d40565b60a081815250506200018a60016200034f640100000000026200257e176401000000009004565b600260006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550620001e4846200037664010000000002620025a4176401000000009004565b600d60006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff1602179055506200024e6000600260009054906101000a9004600f0b60006001620003ca640100000000026401000000009004565b90506000819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550505081601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000d8b565b6000677fffffffffffffff8211156200036757600080fd5b6040829060020a029050919050565b60008082600f0b136200038857600080fd5b60806fb17217f7d1cf79abc9e3b39803f2f6af620003b5846200044e640100000000026401000000009004565b600f0b02908060020a82049150509050919050565b620003d46200061e565b620003de6200061e565b82816000019063ffffffff16908163ffffffff168152505083816020019068ffffffffffffffffff16908168ffffffffffffffffff168152505067ffffffffffffffff8516816040019067ffffffffffffffff16908167ffffffffffffffff168152505080915050949350505050565b60008082600f0b136200046057600080fd5b60008083600f0b90506801000000000000000081126200049c576040819060008212600003808260020a82851804189250505090506040820191505b6401000000008112620004cb576020819060008212600003808260020a82851804189250505090506020820191505b620100008112620004f8576010819060008212600003808260020a82851804189250505090506010820191505b610100811262000524576008819060008212600003808260020a82851804189250505090506008820191505b601081126200054f576004819060008212600003808260020a82851804189250505090506004820191505b600481126200057a576002819060008212600003808260020a82851804189250505090506002820191505b600281126200058a576001820191505b600060408084039060020a029050600083607f0386600f0b9060020a029050600067800000000000000090505b600081131562000611578182029150600060ff83908060020a8204915050905080607f0183908060020a8204915050925080820284019350506001819060008212600003808260020a8285180418925050509050620005b7565b5081945050505050919050565b6040518060600160405280600063ffffffff168152602001600068ffffffffffffffffff168152602001600067ffffffffffffffff1681525090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620006c38262000678565b810181811067ffffffffffffffff82111715620006e557620006e462000689565b5b80604052505050565b6000620006fa6200065a565b9050620007088282620006b8565b919050565b600067ffffffffffffffff8211156200072b576200072a62000689565b5b620007368262000678565b9050602081019050919050565b60005b838110156200076357808201518184015260208101905062000746565b60008484015250505050565b60006200078662000780846200070d565b620006ee565b905082815260208101848484011115620007a557620007a462000673565b5b620007b284828562000743565b509392505050565b600082601f830112620007d257620007d16200066e565b5b8151620007e48482602086016200076f565b91505092915050565b600060ff82169050919050565b6200080581620007ed565b81146200081157600080fd5b50565b6000815190506200082581620007fa565b92915050565b600081600f0b9050919050565b62000843816200082b565b81146200084f57600080fd5b50565b600081519050620008638162000838565b92915050565b6000819050919050565b6200087e8162000869565b81146200088a57600080fd5b50565b6000815190506200089e8162000873565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620008d182620008a4565b9050919050565b620008e381620008c4565b8114620008ef57600080fd5b50565b6000815190506200090381620008d8565b92915050565b60008060008060008060c0878903121562000929576200092862000664565b5b600087015167ffffffffffffffff8111156200094a576200094962000669565b5b6200095889828a01620007ba565b965050602087015167ffffffffffffffff8111156200097c576200097b62000669565b5b6200098a89828a01620007ba565b95505060406200099d89828a0162000814565b9450506060620009b089828a0162000852565b9350506080620009c389828a016200088d565b92505060a0620009d689828a01620008f2565b9150509295509295509295565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062000a3657607f821691505b60208210810362000a4c5762000a4b620009ee565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b60008160020a8302905092915050565b60006008830262000ab97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000a77565b62000ac5868362000a77565b95508019841693508086168417925050509392505050565b6000819050919050565b600062000b0862000b0262000afc8462000869565b62000add565b62000869565b9050919050565b6000819050919050565b62000b248362000ae7565b62000b3c62000b338262000b0f565b84845462000a87565b825550505050565b600090565b62000b5362000b44565b62000b6081848462000b19565b505050565b5b8181101562000b885762000b7c60008262000b49565b60018101905062000b66565b5050565b601f82111562000bd75762000ba18162000a52565b62000bac8462000a67565b8101602085101562000bbc578190505b62000bd462000bcb8562000a67565b83018262000b65565b50505b505050565b60008160020a8304905092915050565b600062000bff6000198460080262000bdc565b1980831691505092915050565b600062000c1a838362000bec565b9150826002028217905092915050565b62000c3582620009e3565b67ffffffffffffffff81111562000c515762000c5062000689565b5b62000c5d825462000a1d565b62000c6a82828562000b8c565b600060209050601f83116001811462000ca2576000841562000c8d578287015190505b62000c99858262000c0c565b86555062000d09565b601f19841662000cb28662000a52565b60005b8281101562000cdc5784890151825560018201915060208501945060208101905062000cb5565b8683101562000cfc578489015162000cf8601f89168262000bec565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000d4d8262000869565b915062000d5a8362000869565b925082820262000d6a8162000869565b9150828204841483151762000d845762000d8362000d11565b5b5092915050565b60805160a0516149d962000dd46000396000818161175a01528181611cba0152818161223401526124540152600081816117860152818161247501526124ba01526149d96000f3fe608060405234801561001057600080fd5b50600436106102bd576000357c0100000000000000000000000000000000000000000000000000000000900480636a2d094e11610184578063983b2d56116100eb578063d89135cd116100a4578063d89135cd1461094a578063e54063a614610968578063e69571af14610998578063e8095295146109c8578063eda4e6d6146109e6578063f2fde38b14610a04576102bd565b8063983b2d561461084e578063a457c2d71461087e578063a9059cbb146108ae578063b470aade146108de578063c0ab7077146108fc578063d340ef8a1461092c576102bd565b806379ba50971161013d57806379ba50971461079c57806384dde4af146107ba5780638da5cb5b146107d85780638f0b2d5d146107f65780638f1df6bc1461081257806395d89b4114610830576102bd565b80636a2d094e146106b257806370a08231146106e2578063731f237c1461071257806373f42561146107305780637445e33a1461074e57806374bedb951461077e576102bd565b80633092afd511610228578063449a52f8116101e1578063449a52f8146105a457806347a50517146105d45780634abfbba21461060457806351b4541c1461063457806358b2833b146106645780636787a9be14610682576102bd565b80633092afd5146104a857806331333487146104d8578063313ce56714610508578063395093511461052657806340452d911461055657806342966c6814610588576102bd565b80631989c6a81161027a5780631989c6a8146103ac578063213d1e1e146103ca578063229ba197146103fa57806323a859441461041857806323b872dd146104485780632a7aec0914610478576102bd565b806301ffc9a7146102c257806306fdde03146102f2578063095ea7b31461031057806309f28f3c1461034057806311c566151461035e57806318160ddd1461038e575b600080fd5b6102dc60048036038101906102d79190613f08565b610a34565b6040516102e99190613f50565b60405180910390f35b6102fa610bda565b6040516103079190613ffb565b60405180910390f35b61032a600480360381019061032591906140b1565b610c68565b6040516103379190613f50565b60405180910390f35b610348610e39565b604051610355919061410d565b60405180910390f35b61037860048036038101906103739190614154565b610e4c565b60405161038591906141a3565b60405180910390f35b610396610e9c565b6040516103a391906141a3565b60405180910390f35b6103b4610eb3565b6040516103c191906141a3565b60405180910390f35b6103e460048036038101906103df919061435f565b610ebf565b6040516103f191906141a3565b60405180910390f35b610402610ed8565b60405161040f919061410d565b60405180910390f35b610432600480360381019061042d919061435f565b610eeb565b60405161043f9190613f50565b60405180910390f35b610462600480360381019061045d919061438c565b610f53565b60405161046f9190613f50565b60405180910390f35b610492600480360381019061048d919061435f565b611106565b60405161049f919061410d565b60405180910390f35b6104c260048036038101906104bd91906143df565b61113e565b6040516104cf9190613f50565b60405180910390f35b6104f260048036038101906104ed919061440c565b611231565b6040516104ff91906141a3565b60405180910390f35b61051061129d565b60405161051d91906141a3565b60405180910390f35b610540600480360381019061053b91906140b1565b6112a3565b60405161054d9190613f50565b60405180910390f35b610570600480360381019061056b919061444c565b611439565b60405161057f939291906144a6565b60405180910390f35b6105a2600480360381019061059d919061444c565b6114a8565b005b6105be60048036038101906105b991906140b1565b6115cd565b6040516105cb9190613f50565b60405180910390f35b6105ee60048036038101906105e991906143df565b61170d565b6040516105fb91906141a3565b60405180910390f35b61061e6004803603810190610619919061444c565b611756565b60405161062b91906141a3565b60405180910390f35b61064e6004803603810190610649919061444c565b6117b6565b60405161065b91906141a3565b60405180910390f35b61066c6117d7565b60405161067991906141a3565b60405180910390f35b61069c6004803603810190610697919061444c565b6117dd565b6040516106a991906141a3565b60405180910390f35b6106cc60048036038101906106c7919061444c565b61181e565b6040516106d991906141a3565b60405180910390f35b6106fc60048036038101906106f791906143df565b61183f565b60405161070991906141a3565b60405180910390f35b61071a6118a6565b60405161072791906141a3565b60405180910390f35b6107386118b7565b60405161074591906141a3565b60405180910390f35b6107686004803603810190610763919061435f565b6118bd565b60405161077591906141a3565b60405180910390f35b6107866118eb565b60405161079391906141a3565b60405180910390f35b6107a46118f1565b6040516107b19190613f50565b60405180910390f35b6107c2611a98565b6040516107cf91906144ec565b60405180910390f35b6107e0611abe565b6040516107ed91906144ec565b60405180910390f35b610810600480360381019061080b91906143df565b611ae4565b005b61081a611b82565b6040516108279190613f50565b60405180910390f35b610838611e32565b6040516108459190613ffb565b60405180910390f35b610868600480360381019061086391906143df565b611ec0565b6040516108759190613f50565b60405180910390f35b610898600480360381019061089391906140b1565b611f7d565b6040516108a59190613f50565b60405180910390f35b6108c860048036038101906108c391906140b1565b61219c565b6040516108d59190613f50565b60405180910390f35b6108e6612232565b6040516108f391906141a3565b60405180910390f35b6109166004803603810190610911919061444c565b612256565b60405161092391906141a3565b60405180910390f35b6109346123aa565b60405161094191906141a3565b60405180910390f35b6109526123b0565b60405161095f91906141a3565b60405180910390f35b610982600480360381019061097d919061435f565b6123ba565b60405161098f91906141a3565b60405180910390f35b6109b260048036038101906109ad9190614507565b6123ce565b6040516109bf91906145dd565b60405180910390f35b6109d061244e565b6040516109dd9190614623565b60405180910390f35b6109ee6124b8565b6040516109fb91906141a3565b60405180910390f35b610a1e6004803603810190610a1991906143df565b6124dc565b604051610a2b9190613f50565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610a885760019050610bd5565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610ada5760019050610bd5565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610b2c5760019050610bd5565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610b7e5760019050610bd5565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610bd05760019050610bd5565b600090505b919050565b60068054610be79061466d565b80601f0160208091040260200160405190810160405280929190818152602001828054610c139061466d565b8015610c605780601f10610c3557610100808354040283529160200191610c60565b820191906000526020600020905b815481529060010190602001808311610c4357829003601f168201915b505050505081565b6000806000600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115610d345760008314610d33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2a906146ea565b60405180910390fd5b5b610d3c611b82565b50610d46836117dd565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610e2691906141a3565b60405180910390a3600191505092915050565b600260009054906101000a9004600f0b81565b600080610e73610e5b8561257e565b610e6e610e68600161257e565b866125e6565b61264d565b9050610e7e816126cc565b67ffffffffffffffff1684610e939190614739565b91505092915050565b6000600c54600954610eae9190614739565b905090565b60008080549050905090565b6000816020015168ffffffffffffffffff169050919050565b600d60009054906101000a9004600f0b81565b600080826000015163ffffffff161115610f085760009050610f4e565b6000826020015168ffffffffffffffffff161115610f295760009050610f4e565b6000826040015167ffffffffffffffff161115610f495760009050610f4e565b600190505b919050565b6000806000610f60611b82565b50610f6a846117dd565b915081600f60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610ff557600080fd5b81600f60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546110819190614739565b92505081905550611093868684612701565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040516110f291906141a3565b60405180910390a380925050509392505050565b60008067ffffffffffffffff836040015160070b169050600081600f0b0361113557611132600161257e565b90505b80915050919050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806111c757503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b6111d057600080fd5b6000600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000806000806112408661257e565b925061124b8561257e565b9150611266600d60009054906101000a9004600f0b8361264d565b905061127181612726565b905061127d838261264d565b9050611288816126cc565b67ffffffffffffffff16935050505092915050565b60085481565b6000806112ae611b82565b506112b8836117dd565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611346919061476d565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460405161142691906141a3565b60405180910390a3600191505092915050565b6000818154811061144957600080fd5b906000526020600020016000915090508060000160009054906101000a900463ffffffff16908060000160049054906101000a900468ffffffffffffffffff169080600001600d9054906101000a900467ffffffffffffffff16905083565b600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166114fe57600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481111561154a57600080fd5b6000611555826117dd565b905061156133826127b3565b5081600c6000828254611574919061476d565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040516115c191906141a3565b60405180910390a25050565b600080600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661165c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611653906147ed565b60405180910390fd5b611664611b82565b5061166e836117dd565b90508260096000828254611682919061476d565b9250508190555061169384826128ba565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516116f191906141a3565b60405180910390a361170161297e565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f000000000000000000000000000000000000000000000000000000000000000082611784919061480d565b7f00000000000000000000000000000000000000000000000000000000000000006117af919061476d565b9050919050565b6000603c82426117c69190614739565b6117d0919061487e565b9050919050565b60035481565b6000806118016117ec8461257e565b600260009054906101000a9004600f0b612b42565b905061180c816126cc565b67ffffffffffffffff16915050919050565b6000603c824261182e9190614739565b611838919061487e565b9050919050565b6000806000806118566118518661170d565b61257e565b92506118636003546117b6565b905061187e83600260009054906101000a9004600f0b61264d565b915061189c61188c836126cc565b67ffffffffffffffff1682611231565b9350505050919050565b60006118b26000612256565b905090565b600c5481565b60008060006118cb84610ebf565b91506118d684611106565b90506118e28282610e4c565b92505050919050565b600b5481565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461194e57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b3e57600080fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000611b8c613e65565b611b94613e65565b611b9c613e65565b6000806000806000611bac6118a6565b50611bb5612bce565b9750611bc088610eeb565b15611bd657600098505050505050505050611e2f565b6000600a5481548110611bec57611beb6148af565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250509550611c99886123ba565b9450600185611ca8919061476d565b9050611cb386611106565b9350603c857f0000000000000000000000000000000000000000000000000000000000000000611ce3919061480d565b611ced919061487e565b9150611d18611d13600d60009054906101000a9004600f0b611d0e8561257e565b61264d565b612726565b9250611d2e600084611d28610e9c565b846123ce565b96506000879080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505050611dea87612d64565b507f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d67581604051611e1a91906141a3565b60405180910390a16001985050505050505050505b90565b60078054611e3f9061466d565b80601f0160208091040260200160405190810160405280929190818152602001828054611e6b9061466d565b8015611eb85780601f10611e8d57610100808354040283529160200191611eb8565b820191906000526020600020905b815481529060010190602001808311611e9b57829003601f168201915b505050505081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f1c57600080fd5b6001600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600080611f89836117dd565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561201457600080fd5b61201c611b82565b5080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120a99190614739565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460405161218991906141a3565b60405180910390a3600191505092915050565b60008060006121a9611b82565b506121b3846117dd565b91506121c0338684612701565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405161221f91906141a3565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060008060006122696003546117b6565b9250600083036122805760009450505050506123a5565b600260009054906101000a9004600f0b90506000861180156122a157508286105b156122aa578592505b6122b38361257e565b91506122ce600d60009054906101000a9004600f0b8361264d565b93506122d984612726565b93506122f4600260009054906101000a9004600f0b8561264d565b600260006101000a8154816fffffffffffffffffffffffffffffffff0219169083600f0b6fffffffffffffffffffffffffffffffff160217905550603c8361233c919061480d565b600354612349919061476d565b60038190555080600f0b836003547f1c9c74563c32efd114cb36fb5e432d9386c8254d08456614804a33a3088ab736600260009054906101000a9004600f0b604051612395919061410d565b60405180910390a4829450505050505b919050565b600a5481565b6000600c54905090565b6000816000015163ffffffff169050919050565b6123d6613e65565b6123de613e65565b82816000019063ffffffff16908163ffffffff168152505083816020019068ffffffffffffffffff16908168ffffffffffffffffff168152505067ffffffffffffffff8516816040019067ffffffffffffffff16908167ffffffffffffffff168152505080915050949350505050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000004261249f9190614739565b6124a9919061487e565b6124b3919061476d565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461253857600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000677fffffffffffffff82111561259557600080fd5b6040829060020a029050919050565b60008082600f0b136125b557600080fd5b60806fb17217f7d1cf79abc9e3b39803f2f6af6125d184612e83565b600f0b02908060020a82049150509050919050565b60008082600f0b84600f0b0390507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b811215801561263a57506f7fffffffffffffffffffffffffffffff600f0b8113155b61264357600080fd5b8091505092915050565b600080604083600f0b85600f0b029060008212600003808260020a82851804189250505090507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b81121580156126b957506f7fffffffffffffffffffffffffffffff600f0b8113155b6126c257600080fd5b8091505092915050565b60008082600f0b12156126de57600080fd5b604082600f0b9060008212600003808260020a8285180418925050509050919050565b60008061270e85846127b3565b5061271984846128ba565b5060019150509392505050565b60006840000000000000000082600f0b1261274057600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b121561277457600090506127ae565b6127ab6080700171547652b82fe1777d0ffda0d23a7d1284600f0b029060008212600003808260020a828518041892505050613049565b90505b919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000850361280f57600093505050506128b4565b6128188661170d565b92508483101561285d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128549061492a565b60405180910390fd5b84836128699190614739565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600085036129165760009350505050612978565b61291f8661170d565b9250848361292d919061476d565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000612988613e65565b6000612992610e9c565b9050600060016000805490506129a89190614739565b815481106129b9576129b86148af565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681525050915080826020019068ffffffffffffffffff16908168ffffffffffffffffff16815250508160006001600080549050612a949190614739565b81548110612aa557612aa46148af565b5b9060005260206000200160008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550604082015181600001600d6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555090505060019250505090565b60008082600f0b03612b5357600080fd5b600082600f0b604085600f0b9060020a0281612b7257612b7161484f565b5b0590507fffffffffffffffffffffffffffffffff80000000000000000000000000000000600f0b8112158015612bbb57506f7fffffffffffffffffffffffffffffff600f0b8113155b612bc457600080fd5b8091505092915050565b612bd6613e65565b612bde613e65565b612be6613e65565b600080600a5481548110612bfd57612bfc6148af565b5b906000526020600020016040518060600160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600d9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152505092503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381865afa158015612d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d2c9190614976565b6fffffffffffffffffffffffffffffffff169050612d49836123ba565b8111612d5a57819350505050612d61565b8293505050505b90565b6000806000612d72846118bd565b612d7a610e9c565b612d849190614739565b9150600b54612d92836117dd565b612d9c9190614739565b9050612dca601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826128ba565b50836000015163ffffffff16601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f9a2a887706623ad3ff7fc85652deeceabe9fe1e00466c597972079ee91ea40d384604051612e3e91906141a3565b60405180910390a36001600a6000828254612e59919061476d565b9250508190555080600b6000828254612e72919061476d565b925050819055508192505050919050565b60008082600f0b13612e9457600080fd5b60008083600f0b9050680100000000000000008112612ecf576040819060008212600003808260020a82851804189250505090506040820191505b6401000000008112612efd576020819060008212600003808260020a82851804189250505090506020820191505b620100008112612f29576010819060008212600003808260020a82851804189250505090506010820191505b6101008112612f54576008819060008212600003808260020a82851804189250505090506008820191505b60108112612f7e576004819060008212600003808260020a82851804189250505090506004820191505b60048112612fa8576002819060008212600003808260020a82851804189250505090506002820191505b60028112612fb7576001820191505b600060408084039060020a029050600083607f0386600f0b9060020a029050600067800000000000000090505b600081131561303c578182029150600060ff83908060020a8204915050905080607f0183908060020a8204915050925080820284019350506001819060008212600003808260020a8285180418925050509050612fe4565b5081945050505050919050565b60006840000000000000000082600f0b1261306357600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b12156130975760009050613e60565b60006f80000000000000000000000000000000905060006780000000000000008416600f0b13156130e557608070016a09e667f3bcc908b2fb1366ea957d3e8202908060020a820491505090505b60006740000000000000008416600f0b131561311e5760807001306fe0a31b7152de8d5a46305c85edec8202908060020a820491505090505b60006720000000000000008416600f0b13156131575760807001172b83c7d517adcdf7c8c50eb14a791f8202908060020a820491505090505b60006710000000000000008416600f0b131561319057608070010b5586cf9890f6298b92b71842a983638202908060020a820491505090505b60006708000000000000008416600f0b13156131c95760807001059b0d31585743ae7c548eb68ca417fd8202908060020a820491505090505b60006704000000000000008416600f0b1315613202576080700102c9a3e778060ee6f7caca4f7a29bde88202908060020a820491505090505b60006702000000000000008416600f0b131561323b57608070010163da9fb33356d84a66ae336dcdfa3f8202908060020a820491505090505b60006701000000000000008416600f0b1315613274576080700100b1afa5abcbed6129ab13ec11dc95438202908060020a820491505090505b600066800000000000008416600f0b13156132ac57608070010058c86da1c09ea1ff19d294cf2f679b8202908060020a820491505090505b600066400000000000008416600f0b13156132e45760807001002c605e2e8cec506d21bfc89a23a00f8202908060020a820491505090505b600066200000000000008416600f0b131561331c576080700100162f3904051fa128bca9c55c31e5df8202908060020a820491505090505b600066100000000000008416600f0b13156133545760807001000b175effdc76ba38e31671ca9397258202908060020a820491505090505b600066080000000000008416600f0b131561338c576080700100058ba01fb9f96d6cacd4b180917c3d8202908060020a820491505090505b600066040000000000008416600f0b13156133c457608070010002c5cc37da9491d0985c348c68e7b38202908060020a820491505090505b600066020000000000008416600f0b13156133fc5760807001000162e525ee054754457d59952920268202908060020a820491505090505b600066010000000000008416600f0b131561343457608070010000b17255775c040618bf4a4ade83fc8202908060020a820491505090505b6000658000000000008416600f0b131561346b5760807001000058b91b5bc9ae2eed81e9b7d4cfab8202908060020a820491505090505b6000654000000000008416600f0b13156134a2576080700100002c5c89d5ec6ca4d7c8acc017b7c98202908060020a820491505090505b6000652000000000008416600f0b13156134d957608070010000162e43f4f831060e02d839a9d16d8202908060020a820491505090505b6000651000000000008416600f0b1315613510576080700100000b1721bcfc99d9f890ea069117638202908060020a820491505090505b6000650800000000008416600f0b131561354757608070010000058b90cf1e6d97f9ca14dbcc16288202908060020a820491505090505b6000650400000000008416600f0b131561357e5760807001000002c5c863b73f016468f6bac5ca2b8202908060020a820491505090505b6000650200000000008416600f0b13156135b5576080700100000162e430e5a18f6119e3c02282a58202908060020a820491505090505b6000650100000000008416600f0b13156135ec5760807001000000b1721835514b86e6d96efd1bfe8202908060020a820491505090505b60006480000000008416600f0b1315613622576080700100000058b90c0b48c6be5df846c5b2ef8202908060020a820491505090505b60006440000000008416600f0b131561365857608070010000002c5c8601cc6b9e94213c72737a8202908060020a820491505090505b60006420000000008416600f0b131561368e5760807001000000162e42fff037df38aa2b219f068202908060020a820491505090505b60006410000000008416600f0b13156136c457608070010000000b17217fba9c739aa5819f44f98202908060020a820491505090505b60006408000000008416600f0b13156136fa5760807001000000058b90bfcdee5acd3c1cedc8238202908060020a820491505090505b60006404000000008416600f0b1315613730576080700100000002c5c85fe31f35a6a30da1be508202908060020a820491505090505b60006402000000008416600f0b131561376657608070010000000162e42ff0999ce3541b9fffcf8202908060020a820491505090505b60006401000000008416600f0b131561379c576080700100000000b17217f80f4ef5aadda455548202908060020a820491505090505b600063800000008416600f0b13156137d157608070010000000058b90bfbf8479bd5a81b51ad8202908060020a820491505090505b600063400000008416600f0b13156138065760807001000000002c5c85fdf84bd62ae30a74cc8202908060020a820491505090505b600063200000008416600f0b131561383b576080700100000000162e42fefb2fed257559bdaa8202908060020a820491505090505b600063100000008416600f0b13156138705760807001000000000b17217f7d5a7716bba4a9ae8202908060020a820491505090505b600063080000008416600f0b13156138a5576080700100000000058b90bfbe9ddbac5e109cce8202908060020a820491505090505b600063040000008416600f0b13156138da57608070010000000002c5c85fdf4b15de6f17eb0d8202908060020a820491505090505b600063020000008416600f0b131561390f5760807001000000000162e42fefa494f1478fde058202908060020a820491505090505b600063010000008416600f0b131561394457608070010000000000b17217f7d20cf927c8e94c8202908060020a820491505090505b6000628000008416600f0b13156139785760807001000000000058b90bfbe8f71cb4e4b33d8202908060020a820491505090505b6000624000008416600f0b13156139ac576080700100000000002c5c85fdf477b662b269458202908060020a820491505090505b6000622000008416600f0b13156139e057608070010000000000162e42fefa3ae53369388c8202908060020a820491505090505b6000621000008416600f0b1315613a14576080700100000000000b17217f7d1d351a389d408202908060020a820491505090505b6000620800008416600f0b1315613a4857608070010000000000058b90bfbe8e8b2d3d4ede8202908060020a820491505090505b6000620400008416600f0b1315613a7c5760807001000000000002c5c85fdf4741bea6e77e8202908060020a820491505090505b6000620200008416600f0b1315613ab0576080700100000000000162e42fefa39fe95583c28202908060020a820491505090505b6000620100008416600f0b1315613ae45760807001000000000000b17217f7d1cfb72b45e18202908060020a820491505090505b60006180008416600f0b1315613b17576080700100000000000058b90bfbe8e7cc35c3f08202908060020a820491505090505b60006140008416600f0b1315613b4a57608070010000000000002c5c85fdf473e242ea388202908060020a820491505090505b60006120008416600f0b1315613b7d5760807001000000000000162e42fefa39f02b772c8202908060020a820491505090505b60006110008416600f0b1315613bb057608070010000000000000b17217f7d1cf7d83c1a8202908060020a820491505090505b60006108008416600f0b1315613be35760807001000000000000058b90bfbe8e7bdcbe2e8202908060020a820491505090505b60006104008416600f0b1315613c16576080700100000000000002c5c85fdf473dea871f8202908060020a820491505090505b60006102008416600f0b1315613c4957608070010000000000000162e42fefa39ef44d918202908060020a820491505090505b60006101008416600f0b1315613c7c576080700100000000000000b17217f7d1cf79e9498202908060020a820491505090505b600060808416600f0b1315613cae57608070010000000000000058b90bfbe8e7bce5448202908060020a820491505090505b600060408416600f0b1315613ce05760807001000000000000002c5c85fdf473de6eca8202908060020a820491505090505b600060208416600f0b1315613d12576080700100000000000000162e42fefa39ef366f8202908060020a820491505090505b600060108416600f0b1315613d445760807001000000000000000b17217f7d1cf79afa8202908060020a820491505090505b600060088416600f0b1315613d76576080700100000000000000058b90bfbe8e7bcd6d8202908060020a820491505090505b600060048416600f0b1315613da857608070010000000000000002c5c85fdf473de6b28202908060020a820491505090505b600060028416600f0b1315613dda5760807001000000000000000162e42fefa39ef3588202908060020a820491505090505b600060018416600f0b1315613e0c57608070010000000000000000b17217f7d1cf79ab8202908060020a820491505090505b604083600f0b9060008212600003808260020a828518041892505050603f03600f0b81908060020a820491505090506f7fffffffffffffffffffffffffffffff600f0b811115613e5b57600080fd5b809150505b919050565b6040518060600160405280600063ffffffff168152602001600068ffffffffffffffffff168152602001600067ffffffffffffffff1681525090565b6000604051905090565b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613ee581613eb0565b8114613ef057600080fd5b50565b600081359050613f0281613edc565b92915050565b600060208284031215613f1e57613f1d613eab565b5b6000613f2c84828501613ef3565b91505092915050565b60008115159050919050565b613f4a81613f35565b82525050565b6000602082019050613f656000830184613f41565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613fa5578082015181840152602081019050613f8a565b60008484015250505050565b6000601f19601f8301169050919050565b6000613fcd82613f6b565b613fd78185613f76565b9350613fe7818560208601613f87565b613ff081613fb1565b840191505092915050565b600060208201905081810360008301526140158184613fc2565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006140488261401d565b9050919050565b6140588161403d565b811461406357600080fd5b50565b6000813590506140758161404f565b92915050565b6000819050919050565b61408e8161407b565b811461409957600080fd5b50565b6000813590506140ab81614085565b92915050565b600080604083850312156140c8576140c7613eab565b5b60006140d685828601614066565b92505060206140e78582860161409c565b9150509250929050565b600081600f0b9050919050565b614107816140f1565b82525050565b600060208201905061412260008301846140fe565b92915050565b614131816140f1565b811461413c57600080fd5b50565b60008135905061414e81614128565b92915050565b6000806040838503121561416b5761416a613eab565b5b60006141798582860161409c565b925050602061418a8582860161413f565b9150509250929050565b61419d8161407b565b82525050565b60006020820190506141b86000830184614194565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6141fb82613fb1565b810181811067ffffffffffffffff8211171561421a576142196141c3565b5b80604052505050565b600061422d613ea1565b905061423982826141f2565b919050565b600063ffffffff82169050919050565b6142578161423e565b811461426257600080fd5b50565b6000813590506142748161424e565b92915050565b600068ffffffffffffffffff82169050919050565b6142988161427a565b81146142a357600080fd5b50565b6000813590506142b58161428f565b92915050565b600067ffffffffffffffff82169050919050565b6142d8816142bb565b81146142e357600080fd5b50565b6000813590506142f5816142cf565b92915050565b600060608284031215614311576143106141be565b5b61431b6060614223565b9050600061432b84828501614265565b600083015250602061433f848285016142a6565b6020830152506040614353848285016142e6565b60408301525092915050565b60006060828403121561437557614374613eab565b5b6000614383848285016142fb565b91505092915050565b6000806000606084860312156143a5576143a4613eab565b5b60006143b386828701614066565b93505060206143c486828701614066565b92505060406143d58682870161409c565b9150509250925092565b6000602082840312156143f5576143f4613eab565b5b600061440384828501614066565b91505092915050565b6000806040838503121561442357614422613eab565b5b60006144318582860161409c565b92505060206144428582860161409c565b9150509250929050565b60006020828403121561446257614461613eab565b5b60006144708482850161409c565b91505092915050565b6144828161423e565b82525050565b6144918161427a565b82525050565b6144a0816142bb565b82525050565b60006060820190506144bb6000830186614479565b6144c86020830185614488565b6144d56040830184614497565b949350505050565b6144e68161403d565b82525050565b600060208201905061450160008301846144dd565b92915050565b6000806000806080858703121561452157614520613eab565b5b600061452f8782880161409c565b94505060206145408782880161413f565b93505060406145518782880161409c565b92505060606145628782880161409c565b91505092959194509250565b6145778161423e565b82525050565b6145868161427a565b82525050565b614595816142bb565b82525050565b6060820160008201516145b1600085018261456e565b5060208201516145c4602085018261457d565b5060408201516145d7604085018261458c565b50505050565b60006060820190506145f2600083018461459b565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61461d816145f8565b82525050565b60006020820190506146386000830184614614565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061468557607f821691505b6020821081036146985761469761463e565b5b50919050565b7f5a45524f5f464952535400000000000000000000000000000000000000000000600082015250565b60006146d4600a83613f76565b91506146df8261469e565b602082019050919050565b60006020820190508181036000830152614703816146c7565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006147448261407b565b915061474f8361407b565b92508282039050818111156147675761476661470a565b5b92915050565b60006147788261407b565b91506147838361407b565b925082820190508082111561479b5761479a61470a565b5b92915050565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b60006147d7600a83613f76565b91506147e2826147a1565b602082019050919050565b60006020820190508181036000830152614806816147ca565b9050919050565b60006148188261407b565b91506148238361407b565b92508282026148318161407b565b915082820484148315176148485761484761470a565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006148898261407b565b91506148948361407b565b9250826148a4576148a361484f565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b6000614914600d83613f76565b915061491f826148de565b602082019050919050565b6000602082019050818103600083015261494381614907565b9050919050565b614953816145f8565b811461495e57600080fd5b50565b6000815190506149708161494a565b92915050565b60006020828403121561498c5761498b613eab565b5b600061499a84828501614961565b9150509291505056fea26469706673582212202f9fd5ae905e4e9dbc4084dd07c38e2c49d286e79910182ef402212c49c2eb2864736f6c63430008110033 \ No newline at end of file diff --git a/python/tests/test_growth.py b/python/tests/test_growth.py index df321d0..cccfa25 100644 --- a/python/tests/test_growth.py +++ b/python/tests/test_growth.py @@ -44,5 +44,23 @@ class TestGrowth(TestDemurrageDefault): self.assertEqual(int(g), 980000000) + def test_decay_steps(self): + nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) + c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + + v = 1000000000 + o = c.decay_by(self.address, v, 43200, sender_address=self.accounts[0]) + r = self.rpc.do(o) + gr = c.parse_decay_by(r) + + v = 1000000000 + for i in range(100): + o = c.decay_by(self.address, v, 432, sender_address=self.accounts[0]) + r = self.rpc.do(o) + v = c.parse_decay_by(r) + + self.assert_within_lower(int(v), int(gr), 0.1) + + if __name__ == '__main__': unittest.main() diff --git a/python/tests/test_period.py b/python/tests/test_period.py index 4ff5457..1b0b16e 100644 --- a/python/tests/test_period.py +++ b/python/tests/test_period.py @@ -16,10 +16,13 @@ from chainlib.eth.contract import ( ABIContractEncoder, ABIContractType, ) +from hexathon import same as hex_same +from hexathon import strip_0x # local imports from erc20_demurrage_token import DemurrageToken -from erc20_demurrage_token.token import DemurrageRedistribution +from erc20_demurrage_token import DemurrageRedistribution +from erc20_demurrage_token.fixed import from_fixed # test imports from erc20_demurrage_token.unittest import TestDemurrageDefault @@ -31,6 +34,55 @@ testdir = os.path.dirname(__file__) class TestPeriod(TestDemurrageDefault): + def test_period_and_amount(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], 1024) + r = self.rpc.do(o) + o = receipt(tx_hash) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + for i in range(100): + self.backend.time_travel(self.start_time + int((self.period_seconds / 100) * (i + 1))) + (tx_hash, o) = c.apply_demurrage(self.address, self.accounts[0], 0) + self.rpc.do(o) + o = receipt(tx_hash) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + for lg in r['logs']: + if hex_same(lg['topics'][0], '1c9c74563c32efd114cb36fb5e432d9386c8254d08456614804a33a3088ab736'): + self.assert_equal_decimals(0.98, from_fixed(strip_0x(lg['data'])), 2) + + + def test_period_demurrage(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], 1024) + r = self.rpc.do(o) + o = receipt(tx_hash) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + self.backend.time_travel(self.start_time + self.period_seconds + int(self.period_seconds / 2)) + (tx_hash, o) = c.change_period(self.address, self.accounts[0]) + self.rpc.do(o) + o = receipt(tx_hash) + r = self.rpc.do(o) + self.assertEqual(r['status'], 1) + + for lg in r['logs']: + if hex_same(lg['topics'][0], '1c9c74563c32efd114cb36fb5e432d9386c8254d08456614804a33a3088ab736'): + self.assert_equal_decimals(0.9701, from_fixed(strip_0x(lg['data'])), 4) + + o = c.redistributions(self.address, 1, sender_address=self.accounts[0]) + r = self.rpc.do(o) + redistribution_data = c.parse_redistributions(r) + redistribution = DemurrageRedistribution(redistribution_data) + logg.debug('fixxx {}'.format(redistribution.demurrage)) + + def test_period(self): nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) @@ -65,17 +117,9 @@ class TestPeriod(TestDemurrageDefault): o = c.to_redistribution_demurrage_modifier(self.address, redistribution, sender_address=self.accounts[0]) r = self.rpc.do(o) - period = c.parse_to_redistribution_item(r) + period = from_fixed(r) redistro = DemurrageRedistribution(redistribution) - - # allow test code float rounding error to billionth - modifier = (1 - (self.tax_level / 1000000)) ** (self.period_seconds / 60) - modifier *= 10 ** 9 - modifier = int(modifier) * (10 ** (28 - 9)) - - period /= (10 ** (28 - 9)) - period = int(period) * (10 ** (28 - 9)) - self.assertEqual(modifier, period) + logg.debug('redistro {} {}'.format(redistro, period)) self.backend.time_travel(self.start_time + self.period_seconds * 2) @@ -92,7 +136,7 @@ class TestPeriod(TestDemurrageDefault): o = c.to_redistribution_demurrage_modifier(self.address, redistribution, sender_address=self.accounts[0]) r = self.rpc.do(o) - period = c.parse_to_redistribution_item(r) + period = from_fixed(r) # allow test code float rounding error to billionth modifier = (1 - (self.tax_level / 1000000)) ** ((self.period_seconds * 2) / 60) diff --git a/python/tests/test_redistribution_single.py b/python/tests/test_redistribution_single.py index b911cab..a3420b1 100644 --- a/python/tests/test_redistribution_single.py +++ b/python/tests/test_redistribution_single.py @@ -16,13 +16,15 @@ from chainlib.eth.address import to_checksum_address from hexathon import ( strip_0x, add_0x, + same as hex_same, ) # local imports from erc20_demurrage_token import DemurrageToken +from erc20_demurrage_token.fixed import from_fixed # test imports -from erc20_demurrage_token.unittest.base import TestDemurrageDefault +from erc20_demurrage_token.unittest import TestDemurrageDefault logging.basicConfig(level=logging.INFO) logg = logging.getLogger() @@ -42,8 +44,8 @@ class TestRedistribution(TestDemurrageDefault): (tx_hash, o) = c.mint_to(self.address, self.accounts[0], self.accounts[0], supply) self.rpc.do(o) - for i in range(1, 10): - logg.debug('execute time travel to period {}'.format(i)) + for i in range(1, 100): + logg.info('execute time travel to period {}'.format(i)) self.backend.time_travel(self.start_time + (self.period_seconds * i)) (tx_hash, o) = c.change_period(self.address, self.accounts[0]) self.rpc.do(o) @@ -51,19 +53,26 @@ class TestRedistribution(TestDemurrageDefault): r = self.rpc.do(o) self.assertEqual(r['status'], 1) + redistribution_value = 0 + for lg in r['logs']: + if hex_same(lg['topics'][0], '0x9a2a887706623ad3ff7fc85652deeceabe9fe1e00466c597972079ee91ea40d3'): + redistribution_value = int(strip_0x(lg['data']), 16) + o = c.redistributions(self.address, i, sender_address=self.accounts[0]) redistribution = self.rpc.do(o) o = c.to_redistribution_demurrage_modifier(self.address, redistribution, sender_address=self.accounts[0]) r = self.rpc.do(o) - demurrage = c.parse_to_redistribution_item(r) + #demurrage = c.parse_to_redistribution_item(r) + demurrage = from_fixed(r) o = c.redistributions(self.address, i-1, sender_address=self.accounts[0]) redistribution = self.rpc.do(o) o = c.to_redistribution_demurrage_modifier(self.address, redistribution, sender_address=self.accounts[0]) r = self.rpc.do(o) - demurrage_previous = c.parse_to_redistribution_item(r) + #demurrage_previous = c.parse_to_redistribution_item(r) + demurrage_previous = from_fixed(r) o = c.balance_of(self.address, self.sink_address, sender_address=self.accounts[0]) r = self.rpc.do(o) @@ -73,9 +82,9 @@ class TestRedistribution(TestDemurrageDefault): r = self.rpc.do(o) balance_minter = c.parse_balance(r) - logg.debug('testing sink {} mint {} adds up to supply {} with demurrage between {} and {}'.format(balance_sink, balance_minter, supply, demurrage_previous, demurrage)) + logg.info('testing redistro {} sink {} mint {} adds up to {} supply {} with demurrage between {} and {}'.format(redistribution_value, balance_sink, balance_minter, balance_sink + balance_minter, supply, demurrage_previous, demurrage)) - self.assert_within_lower(balance_minter + balance_sink, supply, 0.001) + self.assert_within(balance_minter + balance_sink, supply, 10) def test_redistribution_catchup_periods(self): @@ -137,7 +146,7 @@ class TestRedistribution(TestDemurrageDefault): logg.debug('testing sink {} mint {} adds up to supply {} with demurrage between {} and {}'.format(balance_sink, balance_minter, real_supply, demurrage_previous, demurrage)) - self.assert_within_lower(balance_minter + balance_sink, supply, 0.001) + self.assert_within_lower(balance_minter + balance_sink, supply, 0.1) # def test_redistribution_boundaries(self): diff --git a/solidity/DemurrageTokenSingleNocap.sol b/solidity/DemurrageTokenSingleNocap.sol index 1e00fa0..13ea730 100644 --- a/solidity/DemurrageTokenSingleNocap.sol +++ b/solidity/DemurrageTokenSingleNocap.sol @@ -320,7 +320,7 @@ contract DemurrageTokenSingleCap { uint256 unit; uint256 baseUnit; - unit = getDistributionFromRedistribution(_redistribution); + unit = totalSupply() - getDistributionFromRedistribution(_redistribution); baseUnit = toBaseAmount(unit) - totalSink; increaseBaseBalance(sinkAddress, baseUnit); emit Redistribution(sinkAddress, _redistribution.period, unit); @@ -352,9 +352,9 @@ contract DemurrageTokenSingleCap { currentPeriod = toRedistributionPeriod(currentRedistribution); nextPeriod = currentPeriod + 1; lastDemurrageAmount = toRedistributionDemurrageModifier(lastRedistribution); - demurrageCounts = periodDuration / 60; - nextRedistributionDemurrage = ABDKMath64x64.mul(taxLevel, ABDKMath64x64.fromUInt(demurrageCounts)); - nextRedistributionDemurrage = lastDemurrageAmount - ABDKMath64x64.exp(nextRedistributionDemurrage); + demurrageCounts = (periodDuration * currentPeriod) / 60; + // TODO refactor decayby to take int128 then DRY with it + nextRedistributionDemurrage = ABDKMath64x64.exp(ABDKMath64x64.mul(taxLevel, ABDKMath64x64.fromUInt(demurrageCounts))); nextRedistribution = toRedistribution(0, nextRedistributionDemurrage, totalSupply(), nextPeriod); redistributions.push(nextRedistribution); @@ -394,8 +394,8 @@ contract DemurrageTokenSingleCap { periodPoint = ABDKMath64x64.fromUInt(periodCount); v = ABDKMath64x64.mul(taxLevel, periodPoint); v = ABDKMath64x64.exp(v); - demurrageAmount = ABDKMath64x64.mul(demurrageAmount, v); + demurrageTimestamp = demurrageTimestamp + (periodCount * 60); emit Decayed(demurrageTimestamp, periodCount, lastDemurrageAmount, demurrageAmount); return periodCount;