From 34d90b32910afe5e287231947dbffd4fd1979115 Mon Sep 17 00:00:00 2001 From: nolash Date: Tue, 8 Jun 2021 13:53:17 +0200 Subject: [PATCH] WIP add transfers tests --- .../data/DemurrageTokenSingleCap.bin | 2 +- python/examples/sim_noredistribute.py | 6 +++--- python/tests/test_amounts.py | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin b/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin index 9c74f66..3a20c3d 100644 --- a/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin +++ b/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin @@ -1 +1 @@ -61010060405264e8d4a510006a52b7d2dcc80cd2e40000006200002391906200078b565b6080908152503480156200003657600080fd5b50604051620034513803806200345183398181016040528101906200005c9190620004b5565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600c6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555086600690805190602001906200012f92919062000337565b5085600790805190602001906200014892919062000337565b508460ff166008819055504260038190555060035460a08181525050603c836200017391906200078b565b60c081815250506f4b3b4ca85a86c47a098a224000000000600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550836fffffffffffffffffffffffffffffffff1660e0818152505060006200022f6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1660006001620002c8640100000000026401000000009004565b9050600081908060018154018082558091505060019003906000526020600020016000909190919091505581600a8190555082600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560ff16600a620002b491906200064e565b600b81905550505050505050505062000a08565b6000807cffffffffffffffffffffffffffffffff00000000000000000000000000606860ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b828054620003459062000889565b90600052602060002090601f016020900481019282620003695760008555620003b5565b82601f106200038457805160ff1916838001178555620003b5565b82800160010185558215620003b5579182015b82811115620003b457825182559160200191906001019062000397565b5b509050620003c49190620003c8565b5090565b5b80821115620003e3576000816000905550600101620003c9565b5090565b6000620003fe620003f884620005bd565b62000594565b9050828152602081018484840111156200041757600080fd5b6200042484828562000853565b509392505050565b6000815190506200043d81620009a0565b92915050565b600082601f8301126200045557600080fd5b815162000467848260208601620003e7565b91505092915050565b6000815190506200048181620009ba565b92915050565b6000815190506200049881620009d4565b92915050565b600081519050620004af81620009ee565b92915050565b600080600080600080600060e0888a031215620004d157600080fd5b600088015167ffffffffffffffff811115620004ec57600080fd5b620004fa8a828b0162000443565b975050602088015167ffffffffffffffff8111156200051857600080fd5b620005268a828b0162000443565b9650506040620005398a828b016200049e565b95505060606200054c8a828b0162000470565b94505060806200055f8a828b0162000487565b93505060a0620005728a828b016200042c565b92505060c0620005858a828b0162000487565b91505092959891949750929550565b6000620005a0620005b3565b9050620005ae8282620008bf565b919050565b6000604051905090565b600067ffffffffffffffff821115620005db57620005da62000953565b5b620005e68262000982565b9050602081019050919050565b6000808291508390505b600185111562000645578086048111156200061d576200061c620008f5565b5b60018516156200062d5780820291505b80810290506200063d8562000993565b9450620005fd565b94509492505050565b60006200065b826200083c565b915062000668836200083c565b9250620006977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84846200069f565b905092915050565b600082620006b1576001905062000784565b81620006c1576000905062000784565b8160018114620006da5760028114620006e5576200071b565b600191505062000784565b60ff841115620006fa57620006f9620008f5565b5b8360020a915084821115620007145762000713620008f5565b5b5062000784565b5060208310610133831016604e8410600b8410161715620007555782820a9050838111156200074f576200074e620008f5565b5b62000784565b620007648484846001620005f3565b925090508184048111156200077e576200077d620008f5565b5b81810290505b9392505050565b600062000798826200083c565b9150620007a5836200083c565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615620007e157620007e0620008f5565b5b828202905092915050565b6000620007f9826200081c565b9050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156200087357808201518184015260208101905062000856565b8381111562000883576000848401525b50505050565b60006002820490506001821680620008a257607f821691505b60208210811415620008b957620008b862000924565b5b50919050565b620008ca8262000982565b810181811067ffffffffffffffff82111715620008ec57620008eb62000953565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6000600282049050919050565b620009ab81620007ec565b8114620009b757600080fd5b50565b620009c58162000800565b8114620009d157600080fd5b50565b620009df816200083c565b8114620009eb57600080fd5b50565b620009f98162000846565b811462000a0557600080fd5b50565b60805160a05160c05160e0516129d762000a7a60003960008181610c4101528181610e910152611a7601526000818161113301528181611a250152611b1501526000818161115f01528181611b360152611b7b0152600081816111c2015281816111fa015261126201526129d76000f3fe608060405234801561001057600080fd5b5060043610610265576000357c0100000000000000000000000000000000000000000000000000000000900480636a2d094e11610158578063983b2d56116100d5578063e54d63f711610099578063e54d63f7146107ec578063e80952951461081c578063eda4e6d61461083a578063f2fde38b14610858578063f83da35d1461088857610265565b8063983b2d561461070e5780639da7d8ba1461073e578063a9059cbb1461076e578063b470aade1461079e578063e3ab207a146107bc57610265565b80638d34855a1161011c5780638d34855a146106665780638da5cb5b146106965780638f1df6bc146106b45780638f770ad0146106d257806395d89b41146106f057610265565b80636a2d094e1461059a5780636ffa8a05146105ca57806370a08231146105fa578063731f237c1461062a57806379ba50971461064857610265565b8063313ce567116101e657806351b4541c116101aa57806351b4541c146104ce578063573cc507146104fe57806358b2833b1461051c5780636721d4ef1461053a5780636787a9be1461056a57610265565b8063313ce567146103f057806340452d911461040e578063449a52f81461043e57806347a505171461046e5780634abfbba21461049e57610265565b80631989c6a81161022d5780631989c6a814610324578063229ba1971461034257806323b872dd146103605780633092afd51461039057806331333487146103c057610265565b806301ffc9a71461026a57806306fdde031461029a578063095ea7b3146102b857806309f28f3c146102e857806318160ddd14610306575b600080fd5b610284600480360381019061027f9190612250565b6108b8565b6040516102919190612481565b60405180910390f35b6102a2610a63565b6040516102af91906124b7565b60405180910390f35b6102d260048036038101906102cd91906121eb565b610af1565b6040516102df9190612481565b60405180910390f35b6102f0610c0b565b6040516102fd9190612539565b60405180910390f35b61030e610c2d565b60405161031b919061256f565b60405180910390f35b61032c610c33565b604051610339919061256f565b60405180910390f35b61034a610c3f565b604051610357919061256f565b60405180910390f35b61037a6004803603810190610375919061219c565b610c63565b6040516103879190612481565b60405180910390f35b6103aa60048036038101906103a59190612173565b610d83565b6040516103b79190612481565b60405180910390f35b6103da60048036038101906103d591906122cb565b610e76565b6040516103e7919061256f565b60405180910390f35b6103f8610f2a565b604051610405919061256f565b60405180910390f35b610428600480360381019061042391906122a2565b610f30565b604051610435919061249c565b60405180910390f35b610458600480360381019061045391906121eb565b610f54565b6040516104659190612481565b60405180910390f35b61048860048036038101906104839190612173565b6110e6565b604051610495919061256f565b60405180910390f35b6104b860048036038101906104b391906122a2565b61112f565b6040516104c5919061256f565b60405180910390f35b6104e860048036038101906104e391906122a2565b61118f565b6040516104f5919061256f565b60405180910390f35b6105066111b0565b604051610513919061256f565b60405180910390f35b6105246111b6565b604051610531919061256f565b60405180910390f35b610554600480360381019061054f91906122cb565b6111bc565b604051610561919061256f565b60405180910390f35b610584600480360381019061057f91906122a2565b61122d565b604051610591919061256f565b60405180910390f35b6105b460048036038101906105af91906122a2565b61129d565b6040516105c1919061256f565b60405180910390f35b6105e460048036038101906105df9190612227565b6112be565b6040516105f1919061256f565b60405180910390f35b610614600480360381019061060f9190612173565b6112fa565b604051610621919061256f565b60405180910390f35b6106326113a2565b60405161063f9190612481565b60405180910390f35b6106506114c1565b60405161065d9190612481565b60405180910390f35b610680600480360381019061067b9190612227565b611668565b60405161068d919061256f565b60405180910390f35b61069e611696565b6040516106ab9190612466565b60405180910390f35b6106bc6116bc565b6040516106c99190612481565b60405180910390f35b6106da611810565b6040516106e7919061256f565b60405180910390f35b6106f8611816565b60405161070591906124b7565b60405180910390f35b61072860048036038101906107239190612173565b6118a4565b6040516107359190612481565b60405180910390f35b61075860048036038101906107539190612227565b611961565b604051610765919061256f565b60405180910390f35b610788600480360381019061078391906121eb565b61198d565b6040516107959190612481565b60405180910390f35b6107a6611a23565b6040516107b3919061256f565b60405180910390f35b6107d660048036038101906107d19190612227565b611a47565b6040516107e3919061256f565b60405180910390f35b610806600480360381019061080191906122cb565b611a5b565b604051610813919061256f565b60405180910390f35b610824611b0f565b6040516108319190612539565b60405180910390f35b610842611b79565b60405161084f919061256f565b60405180910390f35b610872600480360381019061086d9190612173565b611b9d565b60405161087f9190612481565b60405180910390f35b6108a2600480360381019061089d9190612307565b611c3f565b6040516108af919061249c565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561090d5760019050610a5e565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156109605760019050610a5e565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156109b35760019050610a5e565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610a065760019050610a5e565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610a595760019050610a5e565b600090505b919050565b60068054610a709061279a565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9c9061279a565b8015610ae95780601f10610abe57610100808354040283529160200191610ae9565b820191906000526020600020905b815481529060010190602001808311610acc57829003601f168201915b505050505081565b600080610afc6116bc565b50610b068361122d565b905080600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b9491906125a6565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610bf8919061256f565b60405180910390a3600191505092915050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b60095481565b60008080549050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000610c706116bc565b50610c7a8461122d565b915081600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610d0557600080fd5b610d10868684611cae565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610d6f919061256f565b60405180910390a380925050509392505050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610e0c57503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b610e1557600080fd5b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600080600064e8d4a5100091506a52b7d2dcc80cd2e40000007f0000000000000000000000000000000000000000000000000000000000000000610eba91906125fc565b905060005b84811015610f035764e8d4a510008284610ed9919061262d565b610ee391906125fc565b83610eee9190612687565b92508080610efb906127cc565b915050610ebf565b5064e8d4a510008583610f16919061262d565b610f2091906125fc565b9250505092915050565b60085481565b60008181548110610f4057600080fd5b906000526020600020016000915090505481565b600080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610fe3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fda906124f9565b60405180910390fd5b600a5460095484610ff491906125a6565b1115611035576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102c906124d9565b60405180910390fd5b61103d6116bc565b506110478361122d565b9050826009600082825461105b91906125a6565b9250508190555061106c8482611cd3565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516110ca919061256f565b60405180910390a36110da611d98565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f00000000000000000000000000000000000000000000000000000000000000008261115d919061262d565b7f000000000000000000000000000000000000000000000000000000000000000061118891906125a6565b9050919050565b6000603c824261119f9190612687565b6111a991906125fc565b9050919050565b600b5481565b60035481565b600080827f00000000000000000000000000000000000000000000000000000000000000006111eb9190612687565b846111f6919061262d565b90507f00000000000000000000000000000000000000000000000000000000000000008161122491906125fc565b91505092915050565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff167f00000000000000000000000000000000000000000000000000000000000000008361128c919061262d565b61129691906125fc565b9050919050565b6000603c82426112ad9190612687565b6112b791906125fc565b9050919050565b6000606860ff167cffffffffffffffffffffffffffffffff00000000000000000000000000836001900416908060020a82049150509050919050565b600080600080611309856110e6565b925061131660035461118f565b9050611352600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1682610e76565b6fffffffffffffffffffffffffffffffff16915064e8d4a510006a52b7d2dcc80cd2e4000000611382919061262d565b828461138e919061262d565b61139891906125fc565b9350505050919050565b60008060006113b260035461118f565b915060008214156113c8576000925050506114be565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1690506114058183610e76565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550603c8261144a919061262d565b60035461145791906125a6565b60038190555080826003547fa0717e54e02bd9829db5e6e998aec0ae9de796b8d150a3cc46a92ab869697755600260009054906101000a90046fffffffffffffffffffffffffffffffff166040516114af9190612554565b60405180910390a46001925050505b90565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461151e57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b600080600061167684611961565b9150611681846112be565b905061168d82826111bc565b92505050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060008060008060006116d26113a2565b506116db611e86565b975060006001028814156116fa5760009850505050505050505061180d565b61170388611a47565b955060018661171291906125a6565b905061171d8661112f565b9150600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16945061175b8261129d565b92506000831115611777576117708584611a5b565b935061177b565b8493505b61179460008561178e6009546001611a5b565b84611c3f565b965060008790806001815401808255809150506001900390600052602060002001600090919091909150556117c887611fb6565b507f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d675816040516117f8919061256f565b60405180910390a16001985050505050505050505b90565b600a5481565b600780546118239061279a565b80601f016020809104026020016040519081016040528092919081815260200182805461184f9061279a565b801561189c5780601f106118715761010080835404028352916020019161189c565b820191906000526020600020905b81548152906001019060200180831161187f57829003601f168201915b505050505081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461190057600080fd5b6001600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000602060ff166cffffffffffffffffff00000000836001900416908060020a82049150509050919050565b600080600061199a6116bc565b506119a48461122d565b91506119b1338684611cae565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051611a10919061256f565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600063ffffffff8260019004169050919050565b600080600064e8d4a5100091506a52b7d2dcc80cd2e40000007f0000000000000000000000000000000000000000000000000000000000000000611a9f91906125fc565b905060005b84811015611ae85764e8d4a510008284611abe919061262d565b611ac891906125fc565b83611ad391906125a6565b92508080611ae0906127cc565b915050611aa4565b5064e8d4a510008583611afb919061262d565b611b0591906125fc565b9250505092915050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042611b609190612687565b611b6a91906125fc565b611b7491906125a6565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611bf957600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000807cffffffffffffffffffffffffffffffff00000000000000000000000000606860ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b600080611cbb8584612002565b50611cc68484611cd3565b5060019150509392505050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000851415611d305760009350505050611d92565b611d39866110e6565b92508483611d4791906125a6565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000806000600954905060006001600080549050611db69190612687565b81548110611ded577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001546001900491506cffffffffffffffffff000000001982169150602060ff16819060020a02821791508160010260006001600080549050611e389190612687565b81548110611e6f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020018190555060019250505090565b6000806000806001600080549050611e9e9190612687565b81548110611ed5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015491503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015611f4457600080fd5b505afa158015611f58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7c9190612279565b6fffffffffffffffffffffffffffffffff169050611f9982611a47565b8111611fad57600060010292505050611fb3565b81925050505b90565b600080611fc283611668565b9050611ff8600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611ff38361122d565b611cd3565b5080915050919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600085141561205f5760009350505050612104565b612068866110e6565b9250848310156120ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a490612519565b60405180910390fd5b84836120b99190612687565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000813590506121198161292e565b92915050565b60008135905061212e81612945565b92915050565b6000813590506121438161295c565b92915050565b60008151905061215881612973565b92915050565b60008135905061216d8161298a565b92915050565b60006020828403121561218557600080fd5b60006121938482850161210a565b91505092915050565b6000806000606084860312156121b157600080fd5b60006121bf8682870161210a565b93505060206121d08682870161210a565b92505060406121e18682870161215e565b9150509250925092565b600080604083850312156121fe57600080fd5b600061220c8582860161210a565b925050602061221d8582860161215e565b9150509250929050565b60006020828403121561223957600080fd5b60006122478482850161211f565b91505092915050565b60006020828403121561226257600080fd5b600061227084828501612134565b91505092915050565b60006020828403121561228b57600080fd5b600061229984828501612149565b91505092915050565b6000602082840312156122b457600080fd5b60006122c28482850161215e565b91505092915050565b600080604083850312156122de57600080fd5b60006122ec8582860161215e565b92505060206122fd8582860161215e565b9150509250929050565b6000806000806080858703121561231d57600080fd5b600061232b8782880161215e565b945050602061233c8782880161215e565b935050604061234d8782880161215e565b925050606061235e8782880161215e565b91505092959194509250565b612373816126bb565b82525050565b612382816126cd565b82525050565b612391816126d9565b82525050565b60006123a28261258a565b6123ac8185612595565b93506123bc818560208601612767565b6123c5816128a2565b840191505092915050565b60006123dd600783612595565b91506123e8826128b3565b602082019050919050565b6000612400600a83612595565b915061240b826128dc565b602082019050919050565b6000612423600d83612595565b915061242e82612905565b602082019050919050565b6124428161270f565b82525050565b61245181612755565b82525050565b6124608161274b565b82525050565b600060208201905061247b600083018461236a565b92915050565b60006020820190506124966000830184612379565b92915050565b60006020820190506124b16000830184612388565b92915050565b600060208201905081810360008301526124d18184612397565b905092915050565b600060208201905081810360008301526124f2816123d0565b9050919050565b60006020820190508181036000830152612512816123f3565b9050919050565b6000602082019050818103600083015261253281612416565b9050919050565b600060208201905061254e6000830184612439565b92915050565b60006020820190506125696000830184612448565b92915050565b60006020820190506125846000830184612457565b92915050565b600081519050919050565b600082825260208201905092915050565b60006125b18261274b565b91506125bc8361274b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125f1576125f0612815565b5b828201905092915050565b60006126078261274b565b91506126128361274b565b92508261262257612621612844565b5b828204905092915050565b60006126388261274b565b91506126438361274b565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561267c5761267b612815565b5b828202905092915050565b60006126928261274b565b915061269d8361274b565b9250828210156126b0576126af612815565b5b828203905092915050565b60006126c68261272b565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006127608261270f565b9050919050565b60005b8381101561278557808201518184015260208101905061276a565b83811115612794576000848401525b50505050565b600060028204905060018216806127b257607f821691505b602082108114156127c6576127c5612873565b5b50919050565b60006127d78261274b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561280a57612809612815565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f4552525f43415000000000000000000000000000000000000000000000000000600082015250565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b612937816126bb565b811461294257600080fd5b50565b61294e816126d9565b811461295957600080fd5b50565b612965816126e3565b811461297057600080fd5b50565b61297c8161270f565b811461298757600080fd5b50565b6129938161274b565b811461299e57600080fd5b5056fea264697066735822122014cc4627598701bd01fac9db3e74e05bffb8154d76c2dd6e95bf872a15e9e86564736f6c63430008040033 \ No newline at end of file +61010060405264e8d4a510006a52b7d2dcc80cd2e40000006200002391906200078b565b6080908152503480156200003657600080fd5b50604051620034473803806200344783398181016040528101906200005c9190620004b5565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600c6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555086600690805190602001906200012f92919062000337565b5085600790805190602001906200014892919062000337565b508460ff166008819055504260038190555060035460a08181525050603c836200017391906200078b565b60c081815250506f4b3b4ca85a86c47a098a224000000000600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550836fffffffffffffffffffffffffffffffff1660e0818152505060006200022f6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1660006001620002c8640100000000026401000000009004565b9050600081908060018154018082558091505060019003906000526020600020016000909190919091505581600a8190555082600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560ff16600a620002b491906200064e565b600b81905550505050505050505062000a08565b6000807cffffffffffffffffffffffffffffffff00000000000000000000000000606860ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b828054620003459062000889565b90600052602060002090601f016020900481019282620003695760008555620003b5565b82601f106200038457805160ff1916838001178555620003b5565b82800160010185558215620003b5579182015b82811115620003b457825182559160200191906001019062000397565b5b509050620003c49190620003c8565b5090565b5b80821115620003e3576000816000905550600101620003c9565b5090565b6000620003fe620003f884620005bd565b62000594565b9050828152602081018484840111156200041757600080fd5b6200042484828562000853565b509392505050565b6000815190506200043d81620009a0565b92915050565b600082601f8301126200045557600080fd5b815162000467848260208601620003e7565b91505092915050565b6000815190506200048181620009ba565b92915050565b6000815190506200049881620009d4565b92915050565b600081519050620004af81620009ee565b92915050565b600080600080600080600060e0888a031215620004d157600080fd5b600088015167ffffffffffffffff811115620004ec57600080fd5b620004fa8a828b0162000443565b975050602088015167ffffffffffffffff8111156200051857600080fd5b620005268a828b0162000443565b9650506040620005398a828b016200049e565b95505060606200054c8a828b0162000470565b94505060806200055f8a828b0162000487565b93505060a0620005728a828b016200042c565b92505060c0620005858a828b0162000487565b91505092959891949750929550565b6000620005a0620005b3565b9050620005ae8282620008bf565b919050565b6000604051905090565b600067ffffffffffffffff821115620005db57620005da62000953565b5b620005e68262000982565b9050602081019050919050565b6000808291508390505b600185111562000645578086048111156200061d576200061c620008f5565b5b60018516156200062d5780820291505b80810290506200063d8562000993565b9450620005fd565b94509492505050565b60006200065b826200083c565b915062000668836200083c565b9250620006977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84846200069f565b905092915050565b600082620006b1576001905062000784565b81620006c1576000905062000784565b8160018114620006da5760028114620006e5576200071b565b600191505062000784565b60ff841115620006fa57620006f9620008f5565b5b8360020a915084821115620007145762000713620008f5565b5b5062000784565b5060208310610133831016604e8410600b8410161715620007555782820a9050838111156200074f576200074e620008f5565b5b62000784565b620007648484846001620005f3565b925090508184048111156200077e576200077d620008f5565b5b81810290505b9392505050565b600062000798826200083c565b9150620007a5836200083c565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615620007e157620007e0620008f5565b5b828202905092915050565b6000620007f9826200081c565b9050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156200087357808201518184015260208101905062000856565b8381111562000883576000848401525b50505050565b60006002820490506001821680620008a257607f821691505b60208210811415620008b957620008b862000924565b5b50919050565b620008ca8262000982565b810181811067ffffffffffffffff82111715620008ec57620008eb62000953565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6000600282049050919050565b620009ab81620007ec565b8114620009b757600080fd5b50565b620009c58162000800565b8114620009d157600080fd5b50565b620009df816200083c565b8114620009eb57600080fd5b50565b620009f98162000846565b811462000a0557600080fd5b50565b60805160a05160c05160e0516129cd62000a7a60003960008181610c4101528181610e910152611a6c01526000818161113301528181611a1b0152611b0b01526000818161115f01528181611b2c0152611b710152600081816111c2015281816111fa015261126201526129cd6000f3fe608060405234801561001057600080fd5b5060043610610265576000357c0100000000000000000000000000000000000000000000000000000000900480636a2d094e11610158578063983b2d56116100d5578063e54d63f711610099578063e54d63f7146107ec578063e80952951461081c578063eda4e6d61461083a578063f2fde38b14610858578063f83da35d1461088857610265565b8063983b2d561461070e5780639da7d8ba1461073e578063a9059cbb1461076e578063b470aade1461079e578063e3ab207a146107bc57610265565b80638d34855a1161011c5780638d34855a146106665780638da5cb5b146106965780638f1df6bc146106b45780638f770ad0146106d257806395d89b41146106f057610265565b80636a2d094e1461059a5780636ffa8a05146105ca57806370a08231146105fa578063731f237c1461062a57806379ba50971461064857610265565b8063313ce567116101e657806351b4541c116101aa57806351b4541c146104ce578063573cc507146104fe57806358b2833b1461051c5780636721d4ef1461053a5780636787a9be1461056a57610265565b8063313ce567146103f057806340452d911461040e578063449a52f81461043e57806347a505171461046e5780634abfbba21461049e57610265565b80631989c6a81161022d5780631989c6a814610324578063229ba1971461034257806323b872dd146103605780633092afd51461039057806331333487146103c057610265565b806301ffc9a71461026a57806306fdde031461029a578063095ea7b3146102b857806309f28f3c146102e857806318160ddd14610306575b600080fd5b610284600480360381019061027f9190612246565b6108b8565b6040516102919190612477565b60405180910390f35b6102a2610a63565b6040516102af91906124ad565b60405180910390f35b6102d260048036038101906102cd91906121e1565b610af1565b6040516102df9190612477565b60405180910390f35b6102f0610c0b565b6040516102fd919061252f565b60405180910390f35b61030e610c2d565b60405161031b9190612565565b60405180910390f35b61032c610c33565b6040516103399190612565565b60405180910390f35b61034a610c3f565b6040516103579190612565565b60405180910390f35b61037a60048036038101906103759190612192565b610c63565b6040516103879190612477565b60405180910390f35b6103aa60048036038101906103a59190612169565b610d83565b6040516103b79190612477565b60405180910390f35b6103da60048036038101906103d591906122c1565b610e76565b6040516103e79190612565565b60405180910390f35b6103f8610f2a565b6040516104059190612565565b60405180910390f35b61042860048036038101906104239190612298565b610f30565b6040516104359190612492565b60405180910390f35b610458600480360381019061045391906121e1565b610f54565b6040516104659190612477565b60405180910390f35b61048860048036038101906104839190612169565b6110e6565b6040516104959190612565565b60405180910390f35b6104b860048036038101906104b39190612298565b61112f565b6040516104c59190612565565b60405180910390f35b6104e860048036038101906104e39190612298565b61118f565b6040516104f59190612565565b60405180910390f35b6105066111b0565b6040516105139190612565565b60405180910390f35b6105246111b6565b6040516105319190612565565b60405180910390f35b610554600480360381019061054f91906122c1565b6111bc565b6040516105619190612565565b60405180910390f35b610584600480360381019061057f9190612298565b61122d565b6040516105919190612565565b60405180910390f35b6105b460048036038101906105af9190612298565b61129d565b6040516105c19190612565565b60405180910390f35b6105e460048036038101906105df919061221d565b6112be565b6040516105f19190612565565b60405180910390f35b610614600480360381019061060f9190612169565b6112fa565b6040516106219190612565565b60405180910390f35b6106326113a2565b60405161063f9190612477565b60405180910390f35b6106506114c1565b60405161065d9190612477565b60405180910390f35b610680600480360381019061067b919061221d565b611668565b60405161068d9190612565565b60405180910390f35b61069e611696565b6040516106ab919061245c565b60405180910390f35b6106bc6116bc565b6040516106c99190612477565b60405180910390f35b6106da611806565b6040516106e79190612565565b60405180910390f35b6106f861180c565b60405161070591906124ad565b60405180910390f35b61072860048036038101906107239190612169565b61189a565b6040516107359190612477565b60405180910390f35b6107586004803603810190610753919061221d565b611957565b6040516107659190612565565b60405180910390f35b610788600480360381019061078391906121e1565b611983565b6040516107959190612477565b60405180910390f35b6107a6611a19565b6040516107b39190612565565b60405180910390f35b6107d660048036038101906107d1919061221d565b611a3d565b6040516107e39190612565565b60405180910390f35b610806600480360381019061080191906122c1565b611a51565b6040516108139190612565565b60405180910390f35b610824611b05565b604051610831919061252f565b60405180910390f35b610842611b6f565b60405161084f9190612565565b60405180910390f35b610872600480360381019061086d9190612169565b611b93565b60405161087f9190612477565b60405180910390f35b6108a2600480360381019061089d91906122fd565b611c35565b6040516108af9190612492565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561090d5760019050610a5e565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156109605760019050610a5e565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156109b35760019050610a5e565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610a065760019050610a5e565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610a595760019050610a5e565b600090505b919050565b60068054610a7090612790565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9c90612790565b8015610ae95780601f10610abe57610100808354040283529160200191610ae9565b820191906000526020600020905b815481529060010190602001808311610acc57829003601f168201915b505050505081565b600080610afc6116bc565b50610b068361122d565b905080600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b94919061259c565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610bf89190612565565b60405180910390a3600191505092915050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b60095481565b60008080549050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000610c706116bc565b50610c7a8461122d565b915081600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610d0557600080fd5b610d10868684611ca4565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610d6f9190612565565b60405180910390a380925050509392505050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610e0c57503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b610e1557600080fd5b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b600080600064e8d4a5100091506a52b7d2dcc80cd2e40000007f0000000000000000000000000000000000000000000000000000000000000000610eba91906125f2565b905060005b84811015610f035764e8d4a510008284610ed99190612623565b610ee391906125f2565b83610eee919061267d565b92508080610efb906127c2565b915050610ebf565b5064e8d4a510008583610f169190612623565b610f2091906125f2565b9250505092915050565b60085481565b60008181548110610f4057600080fd5b906000526020600020016000915090505481565b600080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610fe3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fda906124ef565b60405180910390fd5b600a5460095484610ff4919061259c565b1115611035576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102c906124cf565b60405180910390fd5b61103d6116bc565b506110478361122d565b9050826009600082825461105b919061259c565b9250508190555061106c8482611cc9565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8856040516110ca9190612565565b60405180910390a36110da611d8e565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f00000000000000000000000000000000000000000000000000000000000000008261115d9190612623565b7f0000000000000000000000000000000000000000000000000000000000000000611188919061259c565b9050919050565b6000603c824261119f919061267d565b6111a991906125f2565b9050919050565b600b5481565b60035481565b600080827f00000000000000000000000000000000000000000000000000000000000000006111eb919061267d565b846111f69190612623565b90507f00000000000000000000000000000000000000000000000000000000000000008161122491906125f2565b91505092915050565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff167f00000000000000000000000000000000000000000000000000000000000000008361128c9190612623565b61129691906125f2565b9050919050565b6000603c82426112ad919061267d565b6112b791906125f2565b9050919050565b6000606860ff167cffffffffffffffffffffffffffffffff00000000000000000000000000836001900416908060020a82049150509050919050565b600080600080611309856110e6565b925061131660035461118f565b9050611352600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1682610e76565b6fffffffffffffffffffffffffffffffff16915064e8d4a510006a52b7d2dcc80cd2e40000006113829190612623565b828461138e9190612623565b61139891906125f2565b9350505050919050565b60008060006113b260035461118f565b915060008214156113c8576000925050506114be565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1690506114058183610e76565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550603c8261144a9190612623565b600354611457919061259c565b60038190555080826003547fa0717e54e02bd9829db5e6e998aec0ae9de796b8d150a3cc46a92ab869697755600260009054906101000a90046fffffffffffffffffffffffffffffffff166040516114af919061254a565b60405180910390a46001925050505b90565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461151e57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b600080600061167684611957565b9150611681846112be565b905061168d82826111bc565b92505050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060008060008060006116d26113a2565b506116db611e7c565b975060006001028814156116fa57600098505050505050505050611803565b61170388611a3d565b9550600186611712919061259c565b905061171d8661112f565b9150600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16945061175b8261129d565b92506000831115611777576117708584611a51565b935061177b565b8493505b61178a60008560095484611c35565b965060008790806001815401808255809150506001900390600052602060002001600090919091909150556117be87611fac565b507f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d675816040516117ee9190612565565b60405180910390a16001985050505050505050505b90565b600a5481565b6007805461181990612790565b80601f016020809104026020016040519081016040528092919081815260200182805461184590612790565b80156118925780601f1061186757610100808354040283529160200191611892565b820191906000526020600020905b81548152906001019060200180831161187557829003601f168201915b505050505081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118f657600080fd5b6001600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000602060ff166cffffffffffffffffff00000000836001900416908060020a82049150509050919050565b60008060006119906116bc565b5061199a8461122d565b91506119a7338684611ca4565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051611a069190612565565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600063ffffffff8260019004169050919050565b600080600064e8d4a5100091506a52b7d2dcc80cd2e40000007f0000000000000000000000000000000000000000000000000000000000000000611a9591906125f2565b905060005b84811015611ade5764e8d4a510008284611ab49190612623565b611abe91906125f2565b83611ac9919061259c565b92508080611ad6906127c2565b915050611a9a565b5064e8d4a510008583611af19190612623565b611afb91906125f2565b9250505092915050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042611b56919061267d565b611b6091906125f2565b611b6a919061259c565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611bef57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000807cffffffffffffffffffffffffffffffff00000000000000000000000000606860ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b600080611cb18584611ff8565b50611cbc8484611cc9565b5060019150509392505050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000851415611d265760009350505050611d88565b611d2f866110e6565b92508483611d3d919061259c565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000806000600954905060006001600080549050611dac919061267d565b81548110611de3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001546001900491506cffffffffffffffffff000000001982169150602060ff16819060020a02821791508160010260006001600080549050611e2e919061267d565b81548110611e65577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020018190555060019250505090565b6000806000806001600080549050611e94919061267d565b81548110611ecb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015491503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015611f3a57600080fd5b505afa158015611f4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f72919061226f565b6fffffffffffffffffffffffffffffffff169050611f8f82611a3d565b8111611fa357600060010292505050611fa9565b81925050505b90565b600080611fb883611668565b9050611fee600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611fe98361122d565b611cc9565b5080915050919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600085141561205557600093505050506120fa565b61205e866110e6565b9250848310156120a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161209a9061250f565b60405180910390fd5b84836120af919061267d565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b60008135905061210f81612924565b92915050565b6000813590506121248161293b565b92915050565b60008135905061213981612952565b92915050565b60008151905061214e81612969565b92915050565b60008135905061216381612980565b92915050565b60006020828403121561217b57600080fd5b600061218984828501612100565b91505092915050565b6000806000606084860312156121a757600080fd5b60006121b586828701612100565b93505060206121c686828701612100565b92505060406121d786828701612154565b9150509250925092565b600080604083850312156121f457600080fd5b600061220285828601612100565b925050602061221385828601612154565b9150509250929050565b60006020828403121561222f57600080fd5b600061223d84828501612115565b91505092915050565b60006020828403121561225857600080fd5b60006122668482850161212a565b91505092915050565b60006020828403121561228157600080fd5b600061228f8482850161213f565b91505092915050565b6000602082840312156122aa57600080fd5b60006122b884828501612154565b91505092915050565b600080604083850312156122d457600080fd5b60006122e285828601612154565b92505060206122f385828601612154565b9150509250929050565b6000806000806080858703121561231357600080fd5b600061232187828801612154565b945050602061233287828801612154565b935050604061234387828801612154565b925050606061235487828801612154565b91505092959194509250565b612369816126b1565b82525050565b612378816126c3565b82525050565b612387816126cf565b82525050565b600061239882612580565b6123a2818561258b565b93506123b281856020860161275d565b6123bb81612898565b840191505092915050565b60006123d360078361258b565b91506123de826128a9565b602082019050919050565b60006123f6600a8361258b565b9150612401826128d2565b602082019050919050565b6000612419600d8361258b565b9150612424826128fb565b602082019050919050565b61243881612705565b82525050565b6124478161274b565b82525050565b61245681612741565b82525050565b60006020820190506124716000830184612360565b92915050565b600060208201905061248c600083018461236f565b92915050565b60006020820190506124a7600083018461237e565b92915050565b600060208201905081810360008301526124c7818461238d565b905092915050565b600060208201905081810360008301526124e8816123c6565b9050919050565b60006020820190508181036000830152612508816123e9565b9050919050565b600060208201905081810360008301526125288161240c565b9050919050565b6000602082019050612544600083018461242f565b92915050565b600060208201905061255f600083018461243e565b92915050565b600060208201905061257a600083018461244d565b92915050565b600081519050919050565b600082825260208201905092915050565b60006125a782612741565b91506125b283612741565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125e7576125e661280b565b5b828201905092915050565b60006125fd82612741565b915061260883612741565b9250826126185761261761283a565b5b828204905092915050565b600061262e82612741565b915061263983612741565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156126725761267161280b565b5b828202905092915050565b600061268882612741565b915061269383612741565b9250828210156126a6576126a561280b565b5b828203905092915050565b60006126bc82612721565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061275682612705565b9050919050565b60005b8381101561277b578082015181840152602081019050612760565b8381111561278a576000848401525b50505050565b600060028204905060018216806127a857607f821691505b602082108114156127bc576127bb612869565b5b50919050565b60006127cd82612741565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612800576127ff61280b565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f4552525f43415000000000000000000000000000000000000000000000000000600082015250565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b61292d816126b1565b811461293857600080fd5b50565b612944816126cf565b811461294f57600080fd5b50565b61295b816126d9565b811461296657600080fd5b50565b61297281612705565b811461297d57600080fd5b50565b61298981612741565b811461299457600080fd5b5056fea2646970667358221220a0b0ae39c2929b7971b684f430dd1f261c823daa5d9ce75cfbe68e234fd9a3ca64736f6c63430008040033 \ No newline at end of file diff --git a/python/examples/sim_noredistribute.py b/python/examples/sim_noredistribute.py index b294d8c..e5fa2d4 100644 --- a/python/examples/sim_noredistribute.py +++ b/python/examples/sim_noredistribute.py @@ -17,7 +17,7 @@ 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 = 60*24*7 +settings.period_minutes = 10 chain = 'evm:foochain:42' cap = (10 ** 6) * (10 ** 12) @@ -61,8 +61,8 @@ frontend_demurrage = 1.0 - ((1 - decay_per_minute) ** minutes) # corresponding demurrage_delta = contract_demurrage - frontend_demurrage # difference between demurrage in contract and demurrage calculated in frontend alice_checksum = 50000000 - (50000000 * frontend_demurrage) + (200000000 * frontend_demurrage) # alice's balance calculated with frontend demurrage -print("""alice frontend balance {} -alice contract balance {} +#print("""alice frontend balance {} +print("""alice contract balance {} frontend demurrage {:.38f} contract demurrage {:.38f} demurrage delta {:.38f}""".format( diff --git a/python/tests/test_amounts.py b/python/tests/test_amounts.py index cc70d98..6b1bd86 100644 --- a/python/tests/test_amounts.py +++ b/python/tests/test_amounts.py @@ -60,5 +60,24 @@ class TestAmounts(TestDemurrageDefault): self.assert_within_lower(balance, expected_balance, 500) + def test_transfers(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], 2000) + r = self.rpc.do(o) + + self.backend.time_travel(self.start_time + self.period_seconds) + + nonce_oracle = RPCNonceOracle(self.accounts[1], self.rpc) + c = DemurrageToken(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + (tx_hash, o) = c.transfer(self.address, self.accounts[1], self.accounts[2], 500) + r = self.rpc.do(o) + + o = c.balance_of(self.address, self.accounts[1], sender_address=self.accounts[0]) + r = self.rpc.do(o) + balance = c.parse_balance_of(r) + self.assertEqual(balance, 817) + + if __name__ == '__main__': unittest.main()