commit c3a6a692edd4f2c1c96dcddfd863f982b7cf1e7c
parent 030cfdfc979afc6640fdbbfbe7940d936d204c66
Author: nolash <dev@holbrook.no>
Date: Tue, 8 Jun 2021 17:41:49 +0200
Test precision loss of 2 bytes in demurrage store in redistribution data
Diffstat:
7 files changed, 35 insertions(+), 33 deletions(-)
diff --git a/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin b/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin
@@ -1 +1 @@
-61010060405264e8d4a510006a52b7d2dcc80cd2e40000006200002391906200078b565b6080908152503480156200003657600080fd5b50604051620034473803806200344783398181016040528101906200005c9190620004b5565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600c6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555086600690805190602001906200012f92919062000337565b5085600790805190602001906200014892919062000337565b508460ff166008819055504260038190555060035460a08181525050603c836200017391906200078b565b60c081815250506f4b3b4ca85a86c47a098a224000000000600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550836fffffffffffffffffffffffffffffffff1660e0818152505060006200022f6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1660006001620002c8640100000000026401000000009004565b9050600081908060018154018082558091505060019003906000526020600020016000909190919091505581600a8190555082600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560ff16600a620002b491906200064e565b600b81905550505050505050505062000a08565b6000807cffffffffffffffffffffffffffffffff00000000000000000000000000606860ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b828054620003459062000889565b90600052602060002090601f016020900481019282620003695760008555620003b5565b82601f106200038457805160ff1916838001178555620003b5565b82800160010185558215620003b5579182015b82811115620003b457825182559160200191906001019062000397565b5b509050620003c49190620003c8565b5090565b5b80821115620003e3576000816000905550600101620003c9565b5090565b6000620003fe620003f884620005bd565b62000594565b9050828152602081018484840111156200041757600080fd5b6200042484828562000853565b509392505050565b6000815190506200043d81620009a0565b92915050565b600082601f8301126200045557600080fd5b815162000467848260208601620003e7565b91505092915050565b6000815190506200048181620009ba565b92915050565b6000815190506200049881620009d4565b92915050565b600081519050620004af81620009ee565b92915050565b600080600080600080600060e0888a031215620004d157600080fd5b600088015167ffffffffffffffff811115620004ec57600080fd5b620004fa8a828b0162000443565b975050602088015167ffffffffffffffff8111156200051857600080fd5b620005268a828b0162000443565b9650506040620005398a828b016200049e565b95505060606200054c8a828b0162000470565b94505060806200055f8a828b0162000487565b93505060a0620005728a828b016200042c565b92505060c0620005858a828b0162000487565b91505092959891949750929550565b6000620005a0620005b3565b9050620005ae8282620008bf565b919050565b6000604051905090565b600067ffffffffffffffff821115620005db57620005da62000953565b5b620005e68262000982565b9050602081019050919050565b6000808291508390505b600185111562000645578086048111156200061d576200061c620008f5565b5b60018516156200062d5780820291505b80810290506200063d8562000993565b9450620005fd565b94509492505050565b60006200065b826200083c565b915062000668836200083c565b9250620006977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84846200069f565b905092915050565b600082620006b1576001905062000784565b81620006c1576000905062000784565b8160018114620006da5760028114620006e5576200071b565b600191505062000784565b60ff841115620006fa57620006f9620008f5565b5b8360020a915084821115620007145762000713620008f5565b5b5062000784565b5060208310610133831016604e8410600b8410161715620007555782820a9050838111156200074f576200074e620008f5565b5b62000784565b620007648484846001620005f3565b925090508184048111156200077e576200077d620008f5565b5b81810290505b9392505050565b600062000798826200083c565b9150620007a5836200083c565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615620007e157620007e0620008f5565b5b828202905092915050565b6000620007f9826200081c565b9050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156200087357808201518184015260208101905062000856565b8381111562000883576000848401525b50505050565b60006002820490506001821680620008a257607f821691505b60208210811415620008b957620008b862000924565b5b50919050565b620008ca8262000982565b810181811067ffffffffffffffff82111715620008ec57620008eb62000953565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6000600282049050919050565b620009ab81620007ec565b8114620009b757600080fd5b50565b620009c58162000800565b8114620009d157600080fd5b50565b620009df816200083c565b8114620009eb57600080fd5b50565b620009f98162000846565b811462000a0557600080fd5b50565b60805160a05160c05160e0516129cd62000a7a60003960008181610c4101528181610e910152611a6c01526000818161113301528181611a1b0152611b0b01526000818161115f01528181611b2c0152611b710152600081816111c2015281816111fa015261126201526129cd6000f3fe608060405234801561001057600080fd5b5060043610610265576000357c0100000000000000000000000000000000000000000000000000000000900480636a2d094e11610158578063983b2d56116100d5578063e54d63f711610099578063e54d63f7146107ec578063e80952951461081c578063eda4e6d61461083a578063f2fde38b14610858578063f83da35d1461088857610265565b8063983b2d561461070e5780639da7d8ba1461073e578063a9059cbb1461076e578063b470aade1461079e578063e3ab207a146107bc57610265565b80638d34855a1161011c5780638d34855a146106665780638da5cb5b146106965780638f1df6bc146106b45780638f770ad0146106d257806395d89b41146106f057610265565b80636a2d094e1461059a5780636ffa8a05146105ca57806370a08231146105fa578063731f237c1461062a57806379ba50971461064857610265565b8063313ce567116101e657806351b4541c116101aa57806351b4541c146104ce578063573cc507146104fe57806358b2833b1461051c5780636721d4ef1461053a5780636787a9be1461056a57610265565b8063313ce567146103f057806340452d911461040e578063449a52f81461043e57806347a505171461046e5780634abfbba21461049e57610265565b80631989c6a81161022d5780631989c6a814610324578063229ba1971461034257806323b872dd146103605780633092afd51461039057806331333487146103c057610265565b806301ffc9a71461026a57806306fdde031461029a578063095ea7b3146102b857806309f28f3c146102e857806318160ddd14610306575b600080fd5b610284600480360381019061027f9190612246565b6108b8565b6040516102919190612477565b60405180910390f35b6102a2610a63565b6040516102af91906124ad565b60405180910390f35b6102d260048036038101906102cd91906121e1565b610af1565b6040516102df9190612477565b60405180910390f35b6102f0610c0b565b6040516102fd919061252f565b60405180910390f35b61030e610c2d565b60405161031b9190612565565b60405180910390f35b61032c610c33565b6040516103399190612565565b60405180910390f35b61034a610c3f565b6040516103579190612565565b60405180910390f35b61037a60048036038101906103759190612192565b610c63565b6040516103879190612477565b60405180910390f35b6103aa60048036038101906103a59190612169565b610d83565b6040516103b79190612477565b60405180910390f35b6103da60048036038101906103d591906122c1565b610e76565b6040516103e79190612565565b60405180910390f35b6103f8610f2a565b6040516104059190612565565b60405180910390f35b61042860048036038101906104239190612298565b610f30565b6040516104359190612492565b60405180910390f35b610458600480360381019061045391906121e1565b610f54565b6040516104659190612477565b60405180910390f35b61048860048036038101906104839190612169565b6110e6565b6040516104959190612565565b60405180910390f35b6104b860048036038101906104b39190612298565b61112f565b6040516104c59190612565565b60405180910390f35b6104e860048036038101906104e39190612298565b61118f565b6040516104f59190612565565b60405180910390f35b6105066111b0565b6040516105139190612565565b60405180910390f35b6105246111b6565b6040516105319190612565565b60405180910390f35b610554600480360381019061054f91906122c1565b6111bc565b6040516105619190612565565b60405180910390f35b610584600480360381019061057f9190612298565b61122d565b6040516105919190612565565b60405180910390f35b6105b460048036038101906105af9190612298565b61129d565b6040516105c19190612565565b60405180910390f35b6105e460048036038101906105df919061221d565b6112be565b6040516105f19190612565565b60405180910390f35b610614600480360381019061060f9190612169565b6112fa565b6040516106219190612565565b60405180910390f35b6106326113a2565b60405161063f9190612477565b60405180910390f35b6106506114c1565b60405161065d9190612477565b60405180910390f35b610680600480360381019061067b919061221d565b611668565b60405161068d9190612565565b60405180910390f35b61069e611696565b6040516106ab919061245c565b60405180910390f35b6106bc6116bc565b6040516106c99190612477565b60405180910390f35b6106da611806565b6040516106e79190612565565b60405180910390f35b6106f861180c565b60405161070591906124ad565b60405180910390f35b61072860048036038101906107239190612169565b61189a565b6040516107359190612477565b60405180910390f35b6107586004803603810190610753919061221d565b611957565b6040516107659190612565565b60405180910390f35b610788600480360381019061078391906121e1565b611983565b6040516107959190612477565b60405180910390f35b6107a6611a19565b6040516107b39190612565565b60405180910390f35b6107d660048036038101906107d1919061221d565b611a3d565b6040516107e39190612565565b60405180910390f35b610806600480360381019061080191906122c1565b611a51565b6040516108139190612565565b60405180910390f35b610824611b05565b604051610831919061252f565b60405180910390f35b610842611b6f565b60405161084f9190612565565b60405180910390f35b610872600480360381019061086d9190612169565b611b93565b60405161087f9190612477565b60405180910390f35b6108a2600480360381019061089d91906122fd565b611c35565b6040516108af9190612492565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561090d5760019050610a5e565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156109605760019050610a5e565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156109b35760019050610a5e565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610a065760019050610a5e565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610a595760019050610a5e565b600090505b919050565b60068054610a7090612790565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9c90612790565b8015610ae95780601f10610abe57610100808354040283529160200191610ae9565b820191906000526020600020905b815481529060010190602001808311610acc57829003601f168201915b505050505081565b600080610afc6116bc565b50610b068361122d565b905080600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b94919061259c565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610bf89190612565565b60405180910390a3600191505092915050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b60095481565b60008080549050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000610c706116bc565b50610c7a8461122d565b915081600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610d0557600080fd5b610d10868684611ca4565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610d6f9190612565565b60405180910390a380925050509392505050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610e0c57503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b610e1557600080fd5b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600080600064e8d4a5100091506a52b7d2dcc80cd2e40000007f0000000000000000000000000000000000000000000000000000000000000000610eba91906125f2565b905060005b84811015610f035764e8d4a510008284610ed99190612623565b610ee391906125f2565b83610eee919061267d565b92508080610efb906127c2565b915050610ebf565b5064e8d4a510008583610f169190612623565b610f2091906125f2565b9250505092915050565b60085481565b60008181548110610f4057600080fd5b906000526020600020016000915090505481565b600080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610fe3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fda906124ef565b60405180910390fd5b600a5460095484610ff4919061259c565b1115611035576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102c906124cf565b60405180910390fd5b61103d6116bc565b506110478361122d565b9050826009600082825461105b919061259c565b9250508190555061106c8482611cc9565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516110ca9190612565565b60405180910390a36110da611d8e565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f00000000000000000000000000000000000000000000000000000000000000008261115d9190612623565b7f0000000000000000000000000000000000000000000000000000000000000000611188919061259c565b9050919050565b6000603c824261119f919061267d565b6111a991906125f2565b9050919050565b600b5481565b60035481565b600080827f00000000000000000000000000000000000000000000000000000000000000006111eb919061267d565b846111f69190612623565b90507f00000000000000000000000000000000000000000000000000000000000000008161122491906125f2565b91505092915050565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff167f00000000000000000000000000000000000000000000000000000000000000008361128c9190612623565b61129691906125f2565b9050919050565b6000603c82426112ad919061267d565b6112b791906125f2565b9050919050565b6000606860ff167cffffffffffffffffffffffffffffffff00000000000000000000000000836001900416908060020a82049150509050919050565b600080600080611309856110e6565b925061131660035461118f565b9050611352600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1682610e76565b6fffffffffffffffffffffffffffffffff16915064e8d4a510006a52b7d2dcc80cd2e40000006113829190612623565b828461138e9190612623565b61139891906125f2565b9350505050919050565b60008060006113b260035461118f565b915060008214156113c8576000925050506114be565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1690506114058183610e76565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550603c8261144a9190612623565b600354611457919061259c565b60038190555080826003547fa0717e54e02bd9829db5e6e998aec0ae9de796b8d150a3cc46a92ab869697755600260009054906101000a90046fffffffffffffffffffffffffffffffff166040516114af919061254a565b60405180910390a46001925050505b90565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461151e57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b600080600061167684611957565b9150611681846112be565b905061168d82826111bc565b92505050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060008060008060006116d26113a2565b506116db611e7c565b975060006001028814156116fa57600098505050505050505050611803565b61170388611a3d565b9550600186611712919061259c565b905061171d8661112f565b9150600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16945061175b8261129d565b92506000831115611777576117708584611a51565b935061177b565b8493505b61178a60008560095484611c35565b965060008790806001815401808255809150506001900390600052602060002001600090919091909150556117be87611fac565b507f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d675816040516117ee9190612565565b60405180910390a16001985050505050505050505b90565b600a5481565b6007805461181990612790565b80601f016020809104026020016040519081016040528092919081815260200182805461184590612790565b80156118925780601f1061186757610100808354040283529160200191611892565b820191906000526020600020905b81548152906001019060200180831161187557829003601f168201915b505050505081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118f657600080fd5b6001600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000602060ff166cffffffffffffffffff00000000836001900416908060020a82049150509050919050565b60008060006119906116bc565b5061199a8461122d565b91506119a7338684611ca4565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051611a069190612565565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600063ffffffff8260019004169050919050565b600080600064e8d4a5100091506a52b7d2dcc80cd2e40000007f0000000000000000000000000000000000000000000000000000000000000000611a9591906125f2565b905060005b84811015611ade5764e8d4a510008284611ab49190612623565b611abe91906125f2565b83611ac9919061259c565b92508080611ad6906127c2565b915050611a9a565b5064e8d4a510008583611af19190612623565b611afb91906125f2565b9250505092915050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042611b56919061267d565b611b6091906125f2565b611b6a919061259c565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611bef57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000807cffffffffffffffffffffffffffffffff00000000000000000000000000606860ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b600080611cb18584611ff8565b50611cbc8484611cc9565b5060019150509392505050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000851415611d265760009350505050611d88565b611d2f866110e6565b92508483611d3d919061259c565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000806000600954905060006001600080549050611dac919061267d565b81548110611de3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001546001900491506cffffffffffffffffff000000001982169150602060ff16819060020a02821791508160010260006001600080549050611e2e919061267d565b81548110611e65577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020018190555060019250505090565b6000806000806001600080549050611e94919061267d565b81548110611ecb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015491503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015611f3a57600080fd5b505afa158015611f4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f72919061226f565b6fffffffffffffffffffffffffffffffff169050611f8f82611a3d565b8111611fa357600060010292505050611fa9565b81925050505b90565b600080611fb883611668565b9050611fee600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611fe98361122d565b611cc9565b5080915050919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600085141561205557600093505050506120fa565b61205e866110e6565b9250848310156120a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161209a9061250f565b60405180910390fd5b84836120af919061267d565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b60008135905061210f81612924565b92915050565b6000813590506121248161293b565b92915050565b60008135905061213981612952565b92915050565b60008151905061214e81612969565b92915050565b60008135905061216381612980565b92915050565b60006020828403121561217b57600080fd5b600061218984828501612100565b91505092915050565b6000806000606084860312156121a757600080fd5b60006121b586828701612100565b93505060206121c686828701612100565b92505060406121d786828701612154565b9150509250925092565b600080604083850312156121f457600080fd5b600061220285828601612100565b925050602061221385828601612154565b9150509250929050565b60006020828403121561222f57600080fd5b600061223d84828501612115565b91505092915050565b60006020828403121561225857600080fd5b60006122668482850161212a565b91505092915050565b60006020828403121561228157600080fd5b600061228f8482850161213f565b91505092915050565b6000602082840312156122aa57600080fd5b60006122b884828501612154565b91505092915050565b600080604083850312156122d457600080fd5b60006122e285828601612154565b92505060206122f385828601612154565b9150509250929050565b6000806000806080858703121561231357600080fd5b600061232187828801612154565b945050602061233287828801612154565b935050604061234387828801612154565b925050606061235487828801612154565b91505092959194509250565b612369816126b1565b82525050565b612378816126c3565b82525050565b612387816126cf565b82525050565b600061239882612580565b6123a2818561258b565b93506123b281856020860161275d565b6123bb81612898565b840191505092915050565b60006123d360078361258b565b91506123de826128a9565b602082019050919050565b60006123f6600a8361258b565b9150612401826128d2565b602082019050919050565b6000612419600d8361258b565b9150612424826128fb565b602082019050919050565b61243881612705565b82525050565b6124478161274b565b82525050565b61245681612741565b82525050565b60006020820190506124716000830184612360565b92915050565b600060208201905061248c600083018461236f565b92915050565b60006020820190506124a7600083018461237e565b92915050565b600060208201905081810360008301526124c7818461238d565b905092915050565b600060208201905081810360008301526124e8816123c6565b9050919050565b60006020820190508181036000830152612508816123e9565b9050919050565b600060208201905081810360008301526125288161240c565b9050919050565b6000602082019050612544600083018461242f565b92915050565b600060208201905061255f600083018461243e565b92915050565b600060208201905061257a600083018461244d565b92915050565b600081519050919050565b600082825260208201905092915050565b60006125a782612741565b91506125b283612741565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125e7576125e661280b565b5b828201905092915050565b60006125fd82612741565b915061260883612741565b9250826126185761261761283a565b5b828204905092915050565b600061262e82612741565b915061263983612741565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156126725761267161280b565b5b828202905092915050565b600061268882612741565b915061269383612741565b9250828210156126a6576126a561280b565b5b828203905092915050565b60006126bc82612721565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061275682612705565b9050919050565b60005b8381101561277b578082015181840152602081019050612760565b8381111561278a576000848401525b50505050565b600060028204905060018216806127a857607f821691505b602082108114156127bc576127bb612869565b5b50919050565b60006127cd82612741565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612800576127ff61280b565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f4552525f43415000000000000000000000000000000000000000000000000000600082015250565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b61292d816126b1565b811461293857600080fd5b50565b612944816126cf565b811461294f57600080fd5b50565b61295b816126d9565b811461296657600080fd5b50565b61297281612705565b811461297d57600080fd5b50565b61298981612741565b811461299457600080fd5b5056fea2646970667358221220af3c2f3320ef1d316867ea0b957ce11b3e6cae59e749801e1d0ee6baa5a236e064736f6c63430008040033
-\ No newline at end of file
+61010060405264e8d4a510006a52b7d2dcc80cd2e400000062000023919062000785565b6080908152503480156200003657600080fd5b50604051620034b7380380620034b783398181016040528101906200005c9190620004af565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600c6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555086600690805190602001906200012f92919062000331565b5085600790805190602001906200014892919062000331565b508460ff166008819055504260038190555060035460a08181525050603c8362000173919062000785565b60c081815250506b204fce5e3e25026110000000600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550836fffffffffffffffffffffffffffffffff1660e0818152505060006200022b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1660006001620002c4640100000000026401000000009004565b9050600081908060018154018082558091505060019003906000526020600020016000909190919091505581600a8190555082600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560ff16600a620002b0919062000648565b600b81905550505050505050505062000a02565b6000807affffffffffffffffffffffffffff00000000000000000000000000606860ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b8280546200033f9062000883565b90600052602060002090601f016020900481019282620003635760008555620003af565b82601f106200037e57805160ff1916838001178555620003af565b82800160010185558215620003af579182015b82811115620003ae57825182559160200191906001019062000391565b5b509050620003be9190620003c2565b5090565b5b80821115620003dd576000816000905550600101620003c3565b5090565b6000620003f8620003f284620005b7565b6200058e565b9050828152602081018484840111156200041157600080fd5b6200041e8482856200084d565b509392505050565b60008151905062000437816200099a565b92915050565b600082601f8301126200044f57600080fd5b815162000461848260208601620003e1565b91505092915050565b6000815190506200047b81620009b4565b92915050565b6000815190506200049281620009ce565b92915050565b600081519050620004a981620009e8565b92915050565b600080600080600080600060e0888a031215620004cb57600080fd5b600088015167ffffffffffffffff811115620004e657600080fd5b620004f48a828b016200043d565b975050602088015167ffffffffffffffff8111156200051257600080fd5b620005208a828b016200043d565b9650506040620005338a828b0162000498565b9550506060620005468a828b016200046a565b9450506080620005598a828b0162000481565b93505060a06200056c8a828b0162000426565b92505060c06200057f8a828b0162000481565b91505092959891949750929550565b60006200059a620005ad565b9050620005a88282620008b9565b919050565b6000604051905090565b600067ffffffffffffffff821115620005d557620005d46200094d565b5b620005e0826200097c565b9050602081019050919050565b6000808291508390505b60018511156200063f57808604811115620006175762000616620008ef565b5b6001851615620006275780820291505b808102905062000637856200098d565b9450620005f7565b94509492505050565b6000620006558262000836565b9150620006628362000836565b9250620006917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000699565b905092915050565b600082620006ab57600190506200077e565b81620006bb57600090506200077e565b8160018114620006d45760028114620006df5762000715565b60019150506200077e565b60ff841115620006f457620006f3620008ef565b5b8360020a9150848211156200070e576200070d620008ef565b5b506200077e565b5060208310610133831016604e8410600b84101617156200074f5782820a905083811115620007495762000748620008ef565b5b6200077e565b6200075e8484846001620005ed565b92509050818404811115620007785762000777620008ef565b5b81810290505b9392505050565b6000620007928262000836565b91506200079f8362000836565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615620007db57620007da620008ef565b5b828202905092915050565b6000620007f38262000816565b9050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156200086d57808201518184015260208101905062000850565b838111156200087d576000848401525b50505050565b600060028204905060018216806200089c57607f821691505b60208210811415620008b357620008b26200091e565b5b50919050565b620008c4826200097c565b810181811067ffffffffffffffff82111715620008e657620008e56200094d565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6000600282049050919050565b620009a581620007e6565b8114620009b157600080fd5b50565b620009bf81620007fa565b8114620009cb57600080fd5b50565b620009d98162000836565b8114620009e557600080fd5b50565b620009f38162000840565b8114620009ff57600080fd5b50565b60805160a05160c05160e051612a4362000a7460003960008181610c4101528181610e910152611a9a01526000818161113301528181611a490152611b3901526000818161115f01528181611b5a0152611b9f0152600081816111d20152818161120a01526112820152612a436000f3fe608060405234801561001057600080fd5b5060043610610265576000357c0100000000000000000000000000000000000000000000000000000000900480636a2d094e11610158578063983b2d56116100d5578063e54d63f711610099578063e54d63f7146107ec578063e80952951461081c578063eda4e6d61461083a578063f2fde38b14610858578063f83da35d1461088857610265565b8063983b2d561461070e5780639da7d8ba1461073e578063a9059cbb1461076e578063b470aade1461079e578063e3ab207a146107bc57610265565b80638d34855a1161011c5780638d34855a146106665780638da5cb5b146106965780638f1df6bc146106b45780638f770ad0146106d257806395d89b41146106f057610265565b80636a2d094e1461059a5780636ffa8a05146105ca57806370a08231146105fa578063731f237c1461062a57806379ba50971461064857610265565b8063313ce567116101e657806351b4541c116101aa57806351b4541c146104ce578063573cc507146104fe57806358b2833b1461051c5780636721d4ef1461053a5780636787a9be1461056a57610265565b8063313ce567146103f057806340452d911461040e578063449a52f81461043e57806347a505171461046e5780634abfbba21461049e57610265565b80631989c6a81161022d5780631989c6a814610324578063229ba1971461034257806323b872dd146103605780633092afd51461039057806331333487146103c057610265565b806301ffc9a71461026a57806306fdde031461029a578063095ea7b3146102b857806309f28f3c146102e857806318160ddd14610306575b600080fd5b610284600480360381019061027f9190612272565b6108b8565b60405161029191906124a3565b60405180910390f35b6102a2610a63565b6040516102af91906124d9565b60405180910390f35b6102d260048036038101906102cd919061220d565b610af1565b6040516102df91906124a3565b60405180910390f35b6102f0610c0b565b6040516102fd919061255b565b60405180910390f35b61030e610c2d565b60405161031b9190612591565b60405180910390f35b61032c610c33565b6040516103399190612591565b60405180910390f35b61034a610c3f565b6040516103579190612591565b60405180910390f35b61037a600480360381019061037591906121be565b610c63565b60405161038791906124a3565b60405180910390f35b6103aa60048036038101906103a59190612195565b610d83565b6040516103b791906124a3565b60405180910390f35b6103da60048036038101906103d591906122ed565b610e76565b6040516103e79190612591565b60405180910390f35b6103f8610f2a565b6040516104059190612591565b60405180910390f35b610428600480360381019061042391906122c4565b610f30565b60405161043591906124be565b60405180910390f35b6104586004803603810190610453919061220d565b610f54565b60405161046591906124a3565b60405180910390f35b61048860048036038101906104839190612195565b6110e6565b6040516104959190612591565b60405180910390f35b6104b860048036038101906104b391906122c4565b61112f565b6040516104c59190612591565b60405180910390f35b6104e860048036038101906104e391906122c4565b61118f565b6040516104f59190612591565b60405180910390f35b6105066111b0565b6040516105139190612591565b60405180910390f35b6105246111b6565b6040516105319190612591565b60405180910390f35b610554600480360381019061054f91906122ed565b6111bc565b6040516105619190612591565b60405180910390f35b610584600480360381019061057f91906122c4565b61123d565b6040516105919190612591565b60405180910390f35b6105b460048036038101906105af91906122c4565b6112bd565b6040516105c19190612591565b60405180910390f35b6105e460048036038101906105df9190612249565b6112de565b6040516105f19190612591565b60405180910390f35b610614600480360381019061060f9190612195565b611318565b6040516106219190612591565b60405180910390f35b6106326113d0565b60405161063f91906124a3565b60405180910390f35b6106506114ef565b60405161065d91906124a3565b60405180910390f35b610680600480360381019061067b9190612249565b611696565b60405161068d9190612591565b60405180910390f35b61069e6116c4565b6040516106ab9190612488565b60405180910390f35b6106bc6116ea565b6040516106c991906124a3565b60405180910390f35b6106da611834565b6040516106e79190612591565b60405180910390f35b6106f861183a565b60405161070591906124d9565b60405180910390f35b61072860048036038101906107239190612195565b6118c8565b60405161073591906124a3565b60405180910390f35b61075860048036038101906107539190612249565b611985565b6040516107659190612591565b60405180910390f35b6107886004803603810190610783919061220d565b6119b1565b60405161079591906124a3565b60405180910390f35b6107a6611a47565b6040516107b39190612591565b60405180910390f35b6107d660048036038101906107d19190612249565b611a6b565b6040516107e39190612591565b60405180910390f35b610806600480360381019061080191906122ed565b611a7f565b6040516108139190612591565b60405180910390f35b610824611b33565b604051610831919061255b565b60405180910390f35b610842611b9d565b60405161084f9190612591565b60405180910390f35b610872600480360381019061086d9190612195565b611bc1565b60405161087f91906124a3565b60405180910390f35b6108a2600480360381019061089d9190612329565b611c63565b6040516108af91906124be565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561090d5760019050610a5e565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156109605760019050610a5e565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156109b35760019050610a5e565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610a065760019050610a5e565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610a595760019050610a5e565b600090505b919050565b60068054610a7090612806565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9c90612806565b8015610ae95780601f10610abe57610100808354040283529160200191610ae9565b820191906000526020600020905b815481529060010190602001808311610acc57829003601f168201915b505050505081565b600080610afc6116ea565b50610b068361123d565b905080600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b9491906125c8565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610bf89190612591565b60405180910390a3600191505092915050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b60095481565b60008080549050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000610c706116ea565b50610c7a8461123d565b915081600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610d0557600080fd5b610d10868684611cd0565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610d6f9190612591565b60405180910390a380925050509392505050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610e0c57503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b610e1557600080fd5b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600080600064e8d4a5100091506a52b7d2dcc80cd2e40000007f0000000000000000000000000000000000000000000000000000000000000000610eba919061261e565b905060005b84811015610f035764e8d4a510008284610ed99190612699565b610ee3919061261e565b83610eee91906126f3565b92508080610efb90612838565b915050610ebf565b5064e8d4a510008583610f169190612699565b610f20919061261e565b9250505092915050565b60085481565b60008181548110610f4057600080fd5b906000526020600020016000915090505481565b600080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610fe3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fda9061251b565b60405180910390fd5b600a5460095484610ff491906125c8565b1115611035576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102c906124fb565b60405180910390fd5b61103d6116ea565b506110478361123d565b9050826009600082825461105b91906125c8565b9250508190555061106c8482611cf5565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516110ca9190612591565b60405180910390a36110da611dba565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f00000000000000000000000000000000000000000000000000000000000000008261115d9190612699565b7f000000000000000000000000000000000000000000000000000000000000000061118891906125c8565b9050919050565b6000603c824261119f91906126f3565b6111a9919061261e565b9050919050565b600b5481565b60035481565b6000806402540be400836111d09190612699565b7f00000000000000000000000000000000000000000000000000000000000000006111fb91906126f3565b846112069190612699565b90507f000000000000000000000000000000000000000000000000000000000000000081611234919061261e565b91505092915050565b60006402540be400600260009054906101000a90046fffffffffffffffffffffffffffffffff1661126e919061264f565b6fffffffffffffffffffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000836112ac9190612699565b6112b6919061261e565b9050919050565b6000603c82426112cd91906126f3565b6112d7919061261e565b9050919050565b6000606860ff167affffffffffffffffffffffffffff00000000000000000000000000836001900416908060020a82049150509050919050565b600080600080611327856110e6565b925061133460035461118f565b90506113806402540be400600260009054906101000a90046fffffffffffffffffffffffffffffffff16611368919061264f565b6fffffffffffffffffffffffffffffffff1682610e76565b6fffffffffffffffffffffffffffffffff16915064e8d4a510006a52b7d2dcc80cd2e40000006113b09190612699565b82846113bc9190612699565b6113c6919061261e565b9350505050919050565b60008060006113e060035461118f565b915060008214156113f6576000925050506114ec565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1690506114338183610e76565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550603c826114789190612699565b60035461148591906125c8565b60038190555080826003547fa0717e54e02bd9829db5e6e998aec0ae9de796b8d150a3cc46a92ab869697755600260009054906101000a90046fffffffffffffffffffffffffffffffff166040516114dd9190612576565b60405180910390a46001925050505b90565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461154c57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b60008060006116a484611985565b91506116af846112de565b90506116bb82826111bc565b92505050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060008060008060006117006113d0565b50611709611ea8565b9750600060010288141561172857600098505050505050505050611831565b61173188611a6b565b955060018661174091906125c8565b905061174b8661112f565b9150600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169450611789826112bd565b925060008311156117a55761179e8584611a7f565b93506117a9565b8493505b6117b860008560095484611c63565b965060008790806001815401808255809150506001900390600052602060002001600090919091909150556117ec87611fd8565b507f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d6758160405161181c9190612591565b60405180910390a16001985050505050505050505b90565b600a5481565b6007805461184790612806565b80601f016020809104026020016040519081016040528092919081815260200182805461187390612806565b80156118c05780601f10611895576101008083540402835291602001916118c0565b820191906000526020600020905b8154815290600101906020018083116118a357829003601f168201915b505050505081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461192457600080fd5b6001600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000602060ff166cffffffffffffffffff00000000836001900416908060020a82049150509050919050565b60008060006119be6116ea565b506119c88461123d565b91506119d5338684611cd0565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051611a349190612591565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600063ffffffff8260019004169050919050565b600080600064e8d4a5100091506a52b7d2dcc80cd2e40000007f0000000000000000000000000000000000000000000000000000000000000000611ac3919061261e565b905060005b84811015611b0c5764e8d4a510008284611ae29190612699565b611aec919061261e565b83611af791906125c8565b92508080611b0490612838565b915050611ac8565b5064e8d4a510008583611b1f9190612699565b611b29919061261e565b9250505092915050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042611b8491906126f3565b611b8e919061261e565b611b9891906125c8565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c1d57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000807affffffffffffffffffffffffffff00000000000000000000000000606860ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b600080611cdd8584612024565b50611ce88484611cf5565b5060019150509392505050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000851415611d525760009350505050611db4565b611d5b866110e6565b92508483611d6991906125c8565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000806000600954905060006001600080549050611dd891906126f3565b81548110611e0f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001546001900491506cffffffffffffffffff000000001982169150602060ff16819060020a02821791508160010260006001600080549050611e5a91906126f3565b81548110611e91577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020018190555060019250505090565b6000806000806001600080549050611ec091906126f3565b81548110611ef7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015491503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015611f6657600080fd5b505afa158015611f7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f9e919061229b565b6fffffffffffffffffffffffffffffffff169050611fbb82611a6b565b8111611fcf57600060010292505050611fd5565b81925050505b90565b600080611fe483611696565b905061201a600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166120158361123d565b611cf5565b5080915050919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008514156120815760009350505050612126565b61208a866110e6565b9250848310156120cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120c69061253b565b60405180910390fd5b84836120db91906126f3565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b60008135905061213b8161299a565b92915050565b600081359050612150816129b1565b92915050565b600081359050612165816129c8565b92915050565b60008151905061217a816129df565b92915050565b60008135905061218f816129f6565b92915050565b6000602082840312156121a757600080fd5b60006121b58482850161212c565b91505092915050565b6000806000606084860312156121d357600080fd5b60006121e18682870161212c565b93505060206121f28682870161212c565b925050604061220386828701612180565b9150509250925092565b6000806040838503121561222057600080fd5b600061222e8582860161212c565b925050602061223f85828601612180565b9150509250929050565b60006020828403121561225b57600080fd5b600061226984828501612141565b91505092915050565b60006020828403121561228457600080fd5b600061229284828501612156565b91505092915050565b6000602082840312156122ad57600080fd5b60006122bb8482850161216b565b91505092915050565b6000602082840312156122d657600080fd5b60006122e484828501612180565b91505092915050565b6000806040838503121561230057600080fd5b600061230e85828601612180565b925050602061231f85828601612180565b9150509250929050565b6000806000806080858703121561233f57600080fd5b600061234d87828801612180565b945050602061235e87828801612180565b935050604061236f87828801612180565b925050606061238087828801612180565b91505092959194509250565b61239581612727565b82525050565b6123a481612739565b82525050565b6123b381612745565b82525050565b60006123c4826125ac565b6123ce81856125b7565b93506123de8185602086016127d3565b6123e78161290e565b840191505092915050565b60006123ff6007836125b7565b915061240a8261291f565b602082019050919050565b6000612422600a836125b7565b915061242d82612948565b602082019050919050565b6000612445600d836125b7565b915061245082612971565b602082019050919050565b6124648161277b565b82525050565b612473816127c1565b82525050565b612482816127b7565b82525050565b600060208201905061249d600083018461238c565b92915050565b60006020820190506124b8600083018461239b565b92915050565b60006020820190506124d360008301846123aa565b92915050565b600060208201905081810360008301526124f381846123b9565b905092915050565b60006020820190508181036000830152612514816123f2565b9050919050565b6000602082019050818103600083015261253481612415565b9050919050565b6000602082019050818103600083015261255481612438565b9050919050565b6000602082019050612570600083018461245b565b92915050565b600060208201905061258b600083018461246a565b92915050565b60006020820190506125a66000830184612479565b92915050565b600081519050919050565b600082825260208201905092915050565b60006125d3826127b7565b91506125de836127b7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561261357612612612881565b5b828201905092915050565b6000612629826127b7565b9150612634836127b7565b925082612644576126436128b0565b5b828204905092915050565b600061265a8261277b565b91506126658361277b565b9250816fffffffffffffffffffffffffffffffff048311821515161561268e5761268d612881565b5b828202905092915050565b60006126a4826127b7565b91506126af836127b7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156126e8576126e7612881565b5b828202905092915050565b60006126fe826127b7565b9150612709836127b7565b92508282101561271c5761271b612881565b5b828203905092915050565b600061273282612797565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006127cc8261277b565b9050919050565b60005b838110156127f15780820151818401526020810190506127d6565b83811115612800576000848401525b50505050565b6000600282049050600182168061281e57607f821691505b60208210811415612832576128316128df565b5b50919050565b6000612843826127b7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561287657612875612881565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f4552525f43415000000000000000000000000000000000000000000000000000600082015250565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b6129a381612727565b81146129ae57600080fd5b50565b6129ba81612745565b81146129c557600080fd5b50565b6129d18161274f565b81146129dc57600080fd5b50565b6129e88161277b565b81146129f357600080fd5b50565b6129ff816127b7565b8114612a0a57600080fd5b5056fea2646970667358221220f1f61e9e705067d67f6a75c33d8917eaf632c4e22aed7b45d7d93381f2dafc1d64736f6c63430008040033
+\ No newline at end of file
diff --git a/python/examples/sim_noredistribute.py b/python/examples/sim_noredistribute.py
@@ -17,9 +17,10 @@ settings.symbol = 'SIM'
settings.decimals = 6
settings.demurrage_level = int(decay_per_minute*(10**38))
#settings.period_minutes = 1 # 1 week in minutes
-settings.period_minutes = 10
+settings.period_minutes = 60*24*7
chain = 'evm:foochain:42'
cap = (10 ** 6) * (10 ** 12)
+#cap = 0
# instantiate simulation
sim = DemurrageTokenSimulation(chain, settings, redistribute=False, cap=cap, actors=10)
diff --git a/python/test.sh b/python/test.sh
@@ -7,21 +7,21 @@ export PYTHONPATH=.
#modes=(MultiNocap MultiCap SingleCap SingleNocap)
modes=(SingleCap SingleNocap) # other contracts need to be updted
for m in ${modes[@]}; do
- ERC20_DEMURRAGE_TOKEN_TEST_MODE=$m python tests/test_period.py
ERC20_DEMURRAGE_TOKEN_TEST_MODE=$m python tests/test_basic.py
ERC20_DEMURRAGE_TOKEN_TEST_MODE=$m python tests/test_growth.py
ERC20_DEMURRAGE_TOKEN_TEST_MODE=$m python tests/test_amounts.py
+ ERC20_DEMURRAGE_TOKEN_TEST_MODE=$m python tests/test_single.py
done
-modes=(MultiCap SingleCap)
+modes=(SingleCap) # other contracts need to be updted
for m in ${modes[@]}; do
- ERC20_DEMURRAGE_TOKEN_TEST_MODE=$m python tests/test_cap.py
+ ERC20_DEMURRAGE_TOKEN_TEST_MODE=$m python tests/test_period.py
+ ERC20_DEMURRAGE_TOKEN_TEST_MODE=$m python tests/test_redistribution_unit.py
done
-modes=(SingleCap SingleNocap)
+modes=(MultiCap SingleCap)
for m in ${modes[@]}; do
- ERC20_DEMURRAGE_TOKEN_TEST_MODE=$m python tests/test_single.py
- ERC20_DEMURRAGE_TOKEN_TEST_MODE=$m python tests/test_redistribution_unit.py
+ ERC20_DEMURRAGE_TOKEN_TEST_MODE=$m python tests/test_cap.py
done
#modes=(MultiCap MultiNocap)
diff --git a/python/tests/test_period.py b/python/tests/test_period.py
@@ -70,10 +70,10 @@ class TestPeriod(TestDemurrageDefault):
# 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 ** (38 - 9))
+ modifier = int(modifier) * (10 ** (28 - 9))
- period /= (10 ** (38 - 9))
- period = int(period) * (10 ** (38 - 9))
+ period /= (10 ** (28 - 9))
+ period = int(period) * (10 ** (28 - 9))
self.assertEqual(modifier, period)
self.backend.time_travel(self.start_time + self.period_seconds * 2)
@@ -96,10 +96,10 @@ class TestPeriod(TestDemurrageDefault):
# allow test code float rounding error to billionth
modifier = (1 - (self.tax_level / 1000000)) ** ((self.period_seconds * 2) / 60)
modifier *= 10 ** 9
- modifier = int(modifier) * (10 ** (38 - 9))
+ modifier = int(modifier) * (10 ** (28 - 9))
- period /= (10 ** (38 - 9))
- period = int(period) * (10 ** (38 - 9))
+ period /= (10 ** (28 - 9))
+ period = int(period) * (10 ** (28 - 9))
self.assertEqual(modifier, period)
diff --git a/python/tests/test_redistribution_unit.py b/python/tests/test_redistribution_unit.py
@@ -36,21 +36,23 @@ class TestRedistribution(TestDemurrageUnit):
nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
- demurrage = (1 - (self.tax_level / 1000000)) * (10**38)
+ #demurrage = (1 - (self.tax_level / 1000000)) * (10**38)
+ demurrage = (1 - (self.tax_level / 1000000)) * (10**28)
supply = self.default_supply
o = c.get_distribution(self.address, supply, demurrage, sender_address=self.accounts[0])
r = self.rpc.do(o)
distribution = c.parse_get_distribution(r)
expected_distribution = self.default_supply * (self.tax_level / 1000000)
- self.assertEqual(distribution, expected_distribution)
+ self.assert_within_lower(distribution, expected_distribution, 1000)
def test_distribution_from_redistribution(self):
nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc)
c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
- demurrage = (1 - (self.tax_level / 1000000)) * (10**38)
+ #demurrage = (1 - (self.tax_level / 1000000)) * (10**38)
+ demurrage = (1 - (self.tax_level / 1000000)) * (10**28)
supply = self.default_supply
o = c.to_redistribution(self.address, 0, demurrage, supply, 1, sender_address=self.accounts[0])
@@ -60,8 +62,7 @@ class TestRedistribution(TestDemurrageUnit):
r = self.rpc.do(o)
distribution = c.parse_get_distribution(r)
expected_distribution = self.default_supply * (self.tax_level / 1000000)
- self.assertEqual(distribution, expected_distribution)
-
+ self.assert_within_lower(distribution, expected_distribution, 1000)
def test_single_step(self):
diff --git a/solidity/DemurrageTokenSingleCap.sol b/solidity/DemurrageTokenSingleCap.sol
@@ -12,7 +12,7 @@ contract DemurrageTokenSingleCap {
uint8 constant shiftRedistributionValue = 32;
uint256 constant maskRedistributionValue = 0x00000000000000000000000000000000000000ffffffffffffffffff00000000; // ((1 << 72) - 1) << 32
uint8 constant shiftRedistributionDemurrage = 104;
- uint256 constant maskRedistributionDemurrage = 0x000000ffffffffffffffffffffffffffffffff00000000000000000000000000; // ((1 << 20) - 1) << 140
+ uint256 constant maskRedistributionDemurrage = 0x0000000000ffffffffffffffffffffffffffff00000000000000000000000000; // ((1 << 20) - 1) << 140
// Account balances
mapping (address => uint256) account;
@@ -115,7 +115,8 @@ contract DemurrageTokenSingleCap {
periodStart = demurrageTimestamp;
periodDuration = _periodMinutes * 60;
//demurrageAmount = 100000000000000000000000000000000000000 - _taxLevelMinute; // Represents 38 decimal places, same as resolutionFactor
- demurrageAmount = 100000000000000000000000000000000000000;
+ //demurrageAmount = 100000000000000000000000000000000000000;
+ demurrageAmount = 10000000000000000000000000000;
//demurragePeriod = 1;
taxLevel = _taxLevelMinute; // Represents 38 decimal places
bytes32 initialRedistribution = toRedistribution(0, demurrageAmount, 0, 1);
@@ -152,7 +153,7 @@ contract DemurrageTokenSingleCap {
//periodCount = actualPeriod() - demurragePeriod;
periodCount = getMinutesDelta(demurrageTimestamp);
- currentDemurragedAmount = uint128(decayBy(demurrageAmount, periodCount));
+ currentDemurragedAmount = uint128(decayBy(demurrageAmount * 10000000000, periodCount));
return (baseBalance * currentDemurragedAmount) / (nanoDivider * 1000000000000);
}
@@ -281,7 +282,7 @@ contract DemurrageTokenSingleCap {
function getDistribution(uint256 _supply, uint256 _demurrageAmount) public view returns (uint256) {
uint256 difference;
- difference = _supply * (resolutionFactor - _demurrageAmount); //(nanoDivider - ((resolutionFactor - _demurrageAmount) / nanoDivider));
+ difference = _supply * (resolutionFactor - (_demurrageAmount * 10000000000)); //(nanoDivider - ((resolutionFactor - _demurrageAmount) / nanoDivider));
return difference / resolutionFactor;
}
@@ -407,7 +408,7 @@ contract DemurrageTokenSingleCap {
// Inflates the given amount according to the current demurrage modifier
function toBaseAmount(uint256 _value) public view returns (uint256) {
- return (_value * resolutionFactor) / demurrageAmount;
+ return (_value * resolutionFactor) / (demurrageAmount * 10000000000);
}
// Implements ERC20, triggers tax and/or redistribution
diff --git a/solidity/DemurrageTokenSingleNocap.sol b/solidity/DemurrageTokenSingleNocap.sol
@@ -12,11 +12,7 @@ contract DemurrageTokenSingleCap {
uint8 constant shiftRedistributionValue = 32;
uint256 constant maskRedistributionValue = 0x00000000000000000000000000000000000000ffffffffffffffffff00000000; // ((1 << 72) - 1) << 32
uint8 constant shiftRedistributionDemurrage = 104;
- uint256 constant maskRedistributionDemurrage = 0x000000ffffffffffffffffffffffffffffffff00000000000000000000000000; // ((1 << 20) - 1) << 140
-
- uint8 constant shiftRedistributionIsUsed = 255;
- uint256 constant maskRedistributionIsUsed = 0x4000000000000000000000000000000000000000000000000000000000000000; // 1 << 255
-
+ uint256 constant maskRedistributionDemurrage = 0x0000000000ffffffffffffffffffffffffffff00000000000000000000000000; // ((1 << 20) - 1) << 140
// Account balances
mapping (address => uint256) account;
@@ -116,7 +112,8 @@ contract DemurrageTokenSingleCap {
periodStart = demurrageTimestamp;
periodDuration = _periodMinutes * 60;
//demurrageAmount = 100000000000000000000000000000000000000 - _taxLevelMinute; // Represents 38 decimal places, same as resolutionFactor
- demurrageAmount = 100000000000000000000000000000000000000;
+ //demurrageAmount = 100000000000000000000000000000000000000;
+ demurrageAmount = 10000000000000000000000000000;
//demurragePeriod = 1;
taxLevel = _taxLevelMinute; // Represents 38 decimal places
bytes32 initialRedistribution = toRedistribution(0, demurrageAmount, 0, 1);
@@ -152,7 +149,8 @@ contract DemurrageTokenSingleCap {
//periodCount = actualPeriod() - demurragePeriod;
periodCount = getMinutesDelta(demurrageTimestamp);
- currentDemurragedAmount = uint128(decayBy(demurrageAmount, periodCount));
+ //currentDemurragedAmount = uint128(decayBy(demurrageAmount, periodCount));
+ currentDemurragedAmount = uint128(decayBy(demurrageAmount * 10000000000, periodCount));
return (baseBalance * currentDemurragedAmount) / (nanoDivider * 1000000000000);
}
@@ -406,7 +404,8 @@ contract DemurrageTokenSingleCap {
// Inflates the given amount according to the current demurrage modifier
function toBaseAmount(uint256 _value) public view returns (uint256) {
- return (_value * resolutionFactor) / demurrageAmount;
+ //return (_value * resolutionFactor) / demurrageAmount;
+ return (_value * resolutionFactor) / (demurrageAmount * 10000000000);
}
// Implements ERC20, triggers tax and/or redistribution