From 1b1419c03b63f4544de75d4c6fd22ee4a33d7125 Mon Sep 17 00:00:00 2001 From: nolash Date: Mon, 7 Jun 2021 18:16:08 +0200 Subject: [PATCH] Rename divider to nano, expand supply value bit length --- .../data/DemurrageTokenSingleCap.bin | 2 +- python/examples/sim_noredistribute.py | 2 +- solidity/DemurrageTokenSingleCap.sol | 24 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin b/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin index 5634948..4a3708a 100644 --- a/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin +++ b/python/erc20_demurrage_token/data/DemurrageTokenSingleCap.bin @@ -1 +1 @@ -60e06040523480156200001157600080fd5b50604051620032e1380380620032e183398181016040528101906200003791906200043e565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600c6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555086600690805190602001906200010a929190620002d7565b50856007908051906020019062000123929190620002d7565b508460ff166008819055504260038190555060035460808181525050603c836200014e919062000714565b60a0818152505064e8d4a510006a52b7d2dcc80cd2e400000062000173919062000714565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508360c081815250506000620001d86000620f42406000600162000271640100000000026401000000009004565b9050600081908060018154018082558091505060019003906000526020600020016000909190919091505581600a8190555082600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560ff16600a6200025d9190620005d7565b600b8190555050505050505050506200095b565b60008073fffff00000000000000000000000000000000000608c60ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b828054620002e590620007f6565b90600052602060002090601f01602090048101928262000309576000855562000355565b82601f106200032457805160ff191683800117855562000355565b8280016001018555821562000355579182015b828111156200035457825182559160200191906001019062000337565b5b50905062000364919062000368565b5090565b5b808211156200038357600081600090555060010162000369565b5090565b60006200039e620003988462000546565b6200051d565b905082815260208101848484011115620003b757600080fd5b620003c4848285620007c0565b509392505050565b600081519050620003dd816200090d565b92915050565b600082601f830112620003f557600080fd5b81516200040784826020860162000387565b91505092915050565b600081519050620004218162000927565b92915050565b600081519050620004388162000941565b92915050565b600080600080600080600060e0888a0312156200045a57600080fd5b600088015167ffffffffffffffff8111156200047557600080fd5b620004838a828b01620003e3565b975050602088015167ffffffffffffffff811115620004a157600080fd5b620004af8a828b01620003e3565b9650506040620004c28a828b0162000427565b9550506060620004d58a828b0162000410565b9450506080620004e88a828b0162000410565b93505060a0620004fb8a828b01620003cc565b92505060c06200050e8a828b0162000410565b91505092959891949750929550565b6000620005296200053c565b90506200053782826200082c565b919050565b6000604051905090565b600067ffffffffffffffff821115620005645762000563620008c0565b5b6200056f82620008ef565b9050602081019050919050565b6000808291508390505b6001851115620005ce57808604811115620005a657620005a562000862565b5b6001851615620005b65780820291505b8081029050620005c68562000900565b945062000586565b94509492505050565b6000620005e482620007a9565b9150620005f183620007a9565b9250620006207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848462000628565b905092915050565b6000826200063a57600190506200070d565b816200064a57600090506200070d565b81600181146200066357600281146200066e57620006a4565b60019150506200070d565b60ff84111562000683576200068262000862565b5b8360020a9150848211156200069d576200069c62000862565b5b506200070d565b5060208310610133831016604e8410600b8410161715620006de5782820a905083811115620006d857620006d762000862565b5b6200070d565b620006ed84848460016200057c565b9250905081840481111562000707576200070662000862565b5b81810290505b9392505050565b60006200072182620007a9565b91506200072e83620007a9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156200076a576200076962000862565b5b828202905092915050565b6000620007828262000789565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015620007e0578082015181840152602081019050620007c3565b83811115620007f0576000848401525b50505050565b600060028204905060018216806200080f57607f821691505b6020821081141562000826576200082562000891565b5b50919050565b6200083782620008ef565b810181811067ffffffffffffffff82111715620008595762000858620008c0565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6000600282049050919050565b620009188162000775565b81146200092457600080fd5b50565b6200093281620007a9565b81146200093e57600080fd5b50565b6200094c81620007b3565b81146200095857600080fd5b50565b60805160a05160c05161292c620009b560003960008181610bcb01528181610e2701526119c00152600081816110bd015281816119630152611a5b0152600081816110e901528181611a7c0152611ac1015261292c6000f3fe608060405234801561001057600080fd5b506004361061024f576000357c0100000000000000000000000000000000000000000000000000000000900480636787a9be1161014d57806395d89b41116100d5578063e3ab207a11610099578063e3ab207a14610776578063e54d63f7146107a6578063e8095295146107d6578063eda4e6d6146107f4578063f2fde38b146108125761024f565b806395d89b41146106aa578063983b2d56146106c85780639da7d8ba146106f8578063a9059cbb14610728578063b470aade146107585761024f565b8063731f237c1161011c578063731f237c1461061457806379ba5097146106325780638da5cb5b146106505780638f1df6bc1461066e5780638f770ad01461068c5761024f565b80636787a9be146105545780636a2d094e146105845780636ffa8a05146105b457806370a08231146105e45761024f565b806331333487116101db5780634abfbba21161019f5780634abfbba21461048857806351b4541c146104b8578063573cc507146104e857806358b2833b146105065780636721d4ef146105245761024f565b806331333487146103aa578063313ce567146103da57806340452d91146103f8578063449a52f81461042857806347a50517146104585761024f565b806318160ddd1161022257806318160ddd146102f05780631989c6a81461030e578063229ba1971461032c57806323b872dd1461034a5780633092afd51461037a5761024f565b806301ffc9a71461025457806306fdde0314610284578063095ea7b3146102a257806309f28f3c146102d2575b600080fd5b61026e60048036038101906102699190612208565b610842565b60405161027b91906123d6565b60405180910390f35b61028c6109ed565b604051610299919061240c565b60405180910390f35b6102bc60048036038101906102b791906121a3565b610a7b565b6040516102c991906123d6565b60405180910390f35b6102da610b95565b6040516102e7919061248e565b60405180910390f35b6102f8610bb7565b60405161030591906124c4565b60405180910390f35b610316610bbd565b60405161032391906124c4565b60405180910390f35b610334610bc9565b60405161034191906124c4565b60405180910390f35b610364600480360381019061035f9190612154565b610bed565b60405161037191906123d6565b60405180910390f35b610394600480360381019061038f919061212b565b610d0d565b6040516103a191906123d6565b60405180910390f35b6103c460048036038101906103bf9190612283565b610e00565b6040516103d191906124c4565b60405180910390f35b6103e2610ebc565b6040516103ef91906124c4565b60405180910390f35b610412600480360381019061040d919061225a565b610ec2565b60405161041f91906123f1565b60405180910390f35b610442600480360381019061043d91906121a3565b610ee6565b60405161044f91906123d6565b60405180910390f35b610472600480360381019061046d919061212b565b611070565b60405161047f91906124c4565b60405180910390f35b6104a2600480360381019061049d919061225a565b6110b9565b6040516104af91906124c4565b60405180910390f35b6104d260048036038101906104cd919061225a565b611119565b6040516104df91906124c4565b60405180910390f35b6104f061113a565b6040516104fd91906124c4565b60405180910390f35b61050e611140565b60405161051b91906124c4565b60405180910390f35b61053e60048036038101906105399190612283565b611146565b60405161054b91906124c4565b60405180910390f35b61056e6004803603810190610569919061225a565b611182565b60405161057b91906124c4565b60405180910390f35b61059e6004803603810190610599919061225a565b6111ed565b6040516105ab91906124c4565b60405180910390f35b6105ce60048036038101906105c991906121df565b61120e565b6040516105db91906124c4565b60405180910390f35b6105fe60048036038101906105f9919061212b565b611241565b60405161060b91906124c4565b60405180910390f35b61061c6112e9565b60405161062991906123d6565b60405180910390f35b61063a61140b565b60405161064791906123d6565b60405180910390f35b6106586115b2565b60405161066591906123bb565b60405180910390f35b6106766115d8565b60405161068391906123d6565b60405180910390f35b61069461174e565b6040516106a191906124c4565b60405180910390f35b6106b2611754565b6040516106bf919061240c565b60405180910390f35b6106e260048036038101906106dd919061212b565b6117e2565b6040516106ef91906123d6565b60405180910390f35b610712600480360381019061070d91906121df565b61189f565b60405161071f91906124c4565b60405180910390f35b610742600480360381019061073d91906121a3565b6118cb565b60405161074f91906123d6565b60405180910390f35b610760611961565b60405161076d91906124c4565b60405180910390f35b610790600480360381019061078b91906121df565b611985565b60405161079d91906124c4565b60405180910390f35b6107c060048036038101906107bb9190612283565b611999565b6040516107cd91906124c4565b60405180910390f35b6107de611a55565b6040516107eb919061248e565b60405180910390f35b6107fc611abf565b60405161080991906124c4565b60405180910390f35b61082c6004803603810190610827919061212b565b611ae3565b60405161083991906123d6565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561089757600190506109e8565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156108ea57600190506109e8565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561093d57600190506109e8565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561099057600190506109e8565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156109e357600190506109e8565b600090505b919050565b600680546109fa906126ef565b80601f0160208091040260200160405190810160405280929190818152602001828054610a26906126ef565b8015610a735780601f10610a4857610100808354040283529160200191610a73565b820191906000526020600020905b815481529060010190602001808311610a5657829003601f168201915b505050505081565b600080610a866115d8565b50610a9083611182565b905080600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b1e91906124fb565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610b8291906124c4565b60405180910390a3600191505092915050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b60095481565b60008080549050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000610bfa6115d8565b50610c0484611182565b915081600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610c8f57600080fd5b610c9a868684611b85565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610cf991906124c4565b60405180910390a380925050509392505050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610d9657503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b610d9f57600080fd5b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000806000620f42409150620f42406a52b7d2dcc80cd2e4000000610e259190612582565b7f0000000000000000000000000000000000000000000000000000000000000000610e509190612551565b905060005b84811015610e9757620f42408284610e6d9190612582565b610e779190612551565b83610e8291906125dc565b92508080610e8f90612721565b915050610e55565b50620f42408583610ea89190612582565b610eb29190612551565b9250505092915050565b60085481565b60008181548110610ed257600080fd5b906000526020600020016000915090505481565b600080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c9061244e565b60405180910390fd5b600a5460095484610f8691906124fb565b1115610fc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fbe9061242e565b60405180910390fd5b610fcf6115d8565b508290508260096000828254610fe591906124fb565b92505081905550610ff68482611bc6565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161105491906124c4565b60405180910390a3611064611c8b565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f0000000000000000000000000000000000000000000000000000000000000000826110e79190612582565b7f000000000000000000000000000000000000000000000000000000000000000061111291906124fb565b9050919050565b6000603c824261112991906125dc565b6111339190612551565b9050919050565b600b5481565b60035481565b600064e8d4a51000826111599190612551565b6a52b7d2dcc80cd2e400000061116f91906125dc565b8361117a9190612582565b905092915050565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1664e8d4a510006a52b7d2dcc80cd2e4000000846111d29190612582565b6111dc9190612582565b6111e69190612551565b9050919050565b6000603c82426111fd91906125dc565b6112079190612551565b9050919050565b6000608c60ff1673fffff00000000000000000000000000000000000836001900416908060020a82049150509050919050565b60008060008061125085611070565b925061125d600354611119565b9050611299600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1682610e00565b6fffffffffffffffffffffffffffffffff16915064e8d4a510006a52b7d2dcc80cd2e40000006112c99190612582565b82846112d59190612582565b6112df9190612551565b9350505050919050565b6000806000806112fa600354611119565b915060008214156113115760009350505050611408565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16905061134e8183610e00565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550603c826113939190612582565b6003546113a091906124fb565b60038190555080826003547fa0717e54e02bd9829db5e6e998aec0ae9de796b8d150a3cc46a92ab869697755600260009054906101000a90046fffffffffffffffffffffffffffffffff166040516113f891906124a9565b60405180910390a4600193505050505b90565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461146857600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060008060008060006115ee611d83565b9750600060010288141561160d5760009850505050505050505061174b565b61161688611985565b955060018661162591906124fb565b9050611630866110b9565b915061163a6112e9565b50600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169450611677826111ed565b925060008311156116a9576a52b7d2dcc80cd2e40000006116988685611999565b6116a29190612551565b93506116c3565b6a52b7d2dcc80cd2e4000000856116c09190612551565b93505b6116d260008560095484611eb3565b9650600087908060018154018082558091505060019003906000526020600020016000909190919091505561170688611f19565b507f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d6758160405161173691906124c4565b60405180910390a16001985050505050505050505b90565b600a5481565b60078054611761906126ef565b80601f016020809104026020016040519081016040528092919081815260200182805461178d906126ef565b80156117da5780601f106117af576101008083540402835291602001916117da565b820191906000526020600020905b8154815290600101906020018083116117bd57829003601f168201915b505050505081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461183e57600080fd5b6001600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000602060ff166cffffffffffffffffff00000000836001900416908060020a82049150509050919050565b60008060006118d86115d8565b506118e284611182565b91506118ef338684611b85565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405161194e91906124c4565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600063ffffffff8260019004169050919050565b6000806000620f42409150620f42406a52b7d2dcc80cd2e40000006119be9190612582565b7f00000000000000000000000000000000000000000000000000000000000000006119e99190612551565b905060005b84811015611a3057620f42408284611a069190612582565b611a109190612551565b83611a1b91906124fb565b92508080611a2890612721565b9150506119ee565b50620f42408583611a419190612582565b611a4b9190612551565b9250505092915050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042611aa691906125dc565b611ab09190612551565b611aba91906124fb565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b3f57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b600080611b928584611fba565b50611b9d8484611bc6565b50611ba6611a55565b6fffffffffffffffffffffffffffffffff16905060019150509392505050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000851415611c235760009350505050611c85565b611c2c86611070565b92508483611c3a91906124fb565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000806000611c9d6009546001611999565b905060006001600080549050611cb391906125dc565b81548110611cea577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001546001900491506cffffffffffffffffff000000001982169150602060ff16819060020a02821791508160010260006001600080549050611d3591906125dc565b81548110611d6c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020018190555060019250505090565b6000806000806001600080549050611d9b91906125dc565b81548110611dd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015491503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015611e4157600080fd5b505afa158015611e55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e799190612231565b6fffffffffffffffffffffffffffffffff169050611e9682611985565b8111611eaa57600060010292505050611eb0565b81925050505b90565b60008073fffff00000000000000000000000000000000000608c60ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b6000806000611f278461189f565b9150611f6382600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16611146565b9050611faf600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611faa6a52b7d2dcc80cd2e400000084611fa59190612551565b611182565b611bc6565b508092505050919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600085141561201757600093505050506120bc565b61202086611070565b925084831015612065576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205c9061246e565b60405180910390fd5b848361207191906125dc565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000813590506120d181612883565b92915050565b6000813590506120e68161289a565b92915050565b6000813590506120fb816128b1565b92915050565b600081519050612110816128c8565b92915050565b600081359050612125816128df565b92915050565b60006020828403121561213d57600080fd5b600061214b848285016120c2565b91505092915050565b60008060006060848603121561216957600080fd5b6000612177868287016120c2565b9350506020612188868287016120c2565b925050604061219986828701612116565b9150509250925092565b600080604083850312156121b657600080fd5b60006121c4858286016120c2565b92505060206121d585828601612116565b9150509250929050565b6000602082840312156121f157600080fd5b60006121ff848285016120d7565b91505092915050565b60006020828403121561221a57600080fd5b6000612228848285016120ec565b91505092915050565b60006020828403121561224357600080fd5b600061225184828501612101565b91505092915050565b60006020828403121561226c57600080fd5b600061227a84828501612116565b91505092915050565b6000806040838503121561229657600080fd5b60006122a485828601612116565b92505060206122b585828601612116565b9150509250929050565b6122c881612610565b82525050565b6122d781612622565b82525050565b6122e68161262e565b82525050565b60006122f7826124df565b61230181856124ea565b93506123118185602086016126bc565b61231a816127f7565b840191505092915050565b60006123326007836124ea565b915061233d82612808565b602082019050919050565b6000612355600a836124ea565b915061236082612831565b602082019050919050565b6000612378600d836124ea565b91506123838261285a565b602082019050919050565b61239781612664565b82525050565b6123a6816126aa565b82525050565b6123b5816126a0565b82525050565b60006020820190506123d060008301846122bf565b92915050565b60006020820190506123eb60008301846122ce565b92915050565b600060208201905061240660008301846122dd565b92915050565b6000602082019050818103600083015261242681846122ec565b905092915050565b6000602082019050818103600083015261244781612325565b9050919050565b6000602082019050818103600083015261246781612348565b9050919050565b600060208201905081810360008301526124878161236b565b9050919050565b60006020820190506124a3600083018461238e565b92915050565b60006020820190506124be600083018461239d565b92915050565b60006020820190506124d960008301846123ac565b92915050565b600081519050919050565b600082825260208201905092915050565b6000612506826126a0565b9150612511836126a0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125465761254561276a565b5b828201905092915050565b600061255c826126a0565b9150612567836126a0565b92508261257757612576612799565b5b828204905092915050565b600061258d826126a0565b9150612598836126a0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156125d1576125d061276a565b5b828202905092915050565b60006125e7826126a0565b91506125f2836126a0565b9250828210156126055761260461276a565b5b828203905092915050565b600061261b82612680565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006126b582612664565b9050919050565b60005b838110156126da5780820151818401526020810190506126bf565b838111156126e9576000848401525b50505050565b6000600282049050600182168061270757607f821691505b6020821081141561271b5761271a6127c8565b5b50919050565b600061272c826126a0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561275f5761275e61276a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f4552525f43415000000000000000000000000000000000000000000000000000600082015250565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b61288c81612610565b811461289757600080fd5b50565b6128a38161262e565b81146128ae57600080fd5b50565b6128ba81612638565b81146128c557600080fd5b50565b6128d181612664565b81146128dc57600080fd5b50565b6128e8816126a0565b81146128f357600080fd5b5056fea26469706673582212202b28336a06cf238d4203eee1ff279dc99ec913c7f1538f4b0b21cdc0d4dd926564736f6c63430008040033 \ No newline at end of file +60e06040523480156200001157600080fd5b50604051620032ec380380620032ec833981810160405281019062000037919062000445565b33600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600c6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555086600690805190602001906200010a929190620002de565b50856007908051906020019062000123929190620002de565b508460ff166008819055504260038190555060035460808181525050603c836200014e91906200071b565b60a0818152505064e8d4a510006a52b7d2dcc80cd2e40000006200017391906200071b565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508360c081815250506000620001dd6000678ac7230489e800006000600162000276640100000000026401000000009004565b9050600081908060018154018082558091505060019003906000526020600020016000909190919091505581600a8190555082600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560ff16600a620002629190620005de565b600b81905550505050505050505062000962565b600080750ffffffff00000000000000000000000000000000000608c60ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b828054620002ec90620007fd565b90600052602060002090601f0160209004810192826200031057600085556200035c565b82601f106200032b57805160ff19168380011785556200035c565b828001600101855582156200035c579182015b828111156200035b5782518255916020019190600101906200033e565b5b5090506200036b91906200036f565b5090565b5b808211156200038a57600081600090555060010162000370565b5090565b6000620003a56200039f846200054d565b62000524565b905082815260208101848484011115620003be57600080fd5b620003cb848285620007c7565b509392505050565b600081519050620003e48162000914565b92915050565b600082601f830112620003fc57600080fd5b81516200040e8482602086016200038e565b91505092915050565b60008151905062000428816200092e565b92915050565b6000815190506200043f8162000948565b92915050565b600080600080600080600060e0888a0312156200046157600080fd5b600088015167ffffffffffffffff8111156200047c57600080fd5b6200048a8a828b01620003ea565b975050602088015167ffffffffffffffff811115620004a857600080fd5b620004b68a828b01620003ea565b9650506040620004c98a828b016200042e565b9550506060620004dc8a828b0162000417565b9450506080620004ef8a828b0162000417565b93505060a0620005028a828b01620003d3565b92505060c0620005158a828b0162000417565b91505092959891949750929550565b60006200053062000543565b90506200053e828262000833565b919050565b6000604051905090565b600067ffffffffffffffff8211156200056b576200056a620008c7565b5b6200057682620008f6565b9050602081019050919050565b6000808291508390505b6001851115620005d557808604811115620005ad57620005ac62000869565b5b6001851615620005bd5780820291505b8081029050620005cd8562000907565b94506200058d565b94509492505050565b6000620005eb82620007b0565b9150620005f883620007b0565b9250620006277fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84846200062f565b905092915050565b60008262000641576001905062000714565b8162000651576000905062000714565b81600181146200066a57600281146200067557620006ab565b600191505062000714565b60ff8411156200068a576200068962000869565b5b8360020a915084821115620006a457620006a362000869565b5b5062000714565b5060208310610133831016604e8410600b8410161715620006e55782820a905083811115620006df57620006de62000869565b5b62000714565b620006f4848484600162000583565b925090508184048111156200070e576200070d62000869565b5b81810290505b9392505050565b60006200072882620007b0565b91506200073583620007b0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161562000771576200077062000869565b5b828202905092915050565b6000620007898262000790565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015620007e7578082015181840152602081019050620007ca565b83811115620007f7576000848401525b50505050565b600060028204905060018216806200081657607f821691505b602082108114156200082d576200082c62000898565b5b50919050565b6200083e82620008f6565b810181811067ffffffffffffffff8211171562000860576200085f620008c7565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6000600282049050919050565b6200091f816200077c565b81146200092b57600080fd5b50565b6200093981620007b0565b81146200094557600080fd5b50565b6200095381620007ba565b81146200095f57600080fd5b50565b60805160a05160c051612930620009bc60003960008181610bcb01528181610e2701526119c20152600081816110bd015281816119650152611a5d0152600081816110e901528181611a7e0152611ac301526129306000f3fe608060405234801561001057600080fd5b506004361061024f576000357c0100000000000000000000000000000000000000000000000000000000900480636787a9be1161014d57806395d89b41116100d5578063e3ab207a11610099578063e3ab207a14610776578063e54d63f7146107a6578063e8095295146107d6578063eda4e6d6146107f4578063f2fde38b146108125761024f565b806395d89b41146106aa578063983b2d56146106c85780639da7d8ba146106f8578063a9059cbb14610728578063b470aade146107585761024f565b8063731f237c1161011c578063731f237c1461061457806379ba5097146106325780638da5cb5b146106505780638f1df6bc1461066e5780638f770ad01461068c5761024f565b80636787a9be146105545780636a2d094e146105845780636ffa8a05146105b457806370a08231146105e45761024f565b806331333487116101db5780634abfbba21161019f5780634abfbba21461048857806351b4541c146104b8578063573cc507146104e857806358b2833b146105065780636721d4ef146105245761024f565b806331333487146103aa578063313ce567146103da57806340452d91146103f8578063449a52f81461042857806347a50517146104585761024f565b806318160ddd1161022257806318160ddd146102f05780631989c6a81461030e578063229ba1971461032c57806323b872dd1461034a5780633092afd51461037a5761024f565b806301ffc9a71461025457806306fdde0314610284578063095ea7b3146102a257806309f28f3c146102d2575b600080fd5b61026e6004803603810190610269919061220c565b610842565b60405161027b91906123da565b60405180910390f35b61028c6109ed565b6040516102999190612410565b60405180910390f35b6102bc60048036038101906102b791906121a7565b610a7b565b6040516102c991906123da565b60405180910390f35b6102da610b95565b6040516102e79190612492565b60405180910390f35b6102f8610bb7565b60405161030591906124c8565b60405180910390f35b610316610bbd565b60405161032391906124c8565b60405180910390f35b610334610bc9565b60405161034191906124c8565b60405180910390f35b610364600480360381019061035f9190612158565b610bed565b60405161037191906123da565b60405180910390f35b610394600480360381019061038f919061212f565b610d0d565b6040516103a191906123da565b60405180910390f35b6103c460048036038101906103bf9190612287565b610e00565b6040516103d191906124c8565b60405180910390f35b6103e2610ebc565b6040516103ef91906124c8565b60405180910390f35b610412600480360381019061040d919061225e565b610ec2565b60405161041f91906123f5565b60405180910390f35b610442600480360381019061043d91906121a7565b610ee6565b60405161044f91906123da565b60405180910390f35b610472600480360381019061046d919061212f565b611070565b60405161047f91906124c8565b60405180910390f35b6104a2600480360381019061049d919061225e565b6110b9565b6040516104af91906124c8565b60405180910390f35b6104d260048036038101906104cd919061225e565b611119565b6040516104df91906124c8565b60405180910390f35b6104f061113a565b6040516104fd91906124c8565b60405180910390f35b61050e611140565b60405161051b91906124c8565b60405180910390f35b61053e60048036038101906105399190612287565b611146565b60405161054b91906124c8565b60405180910390f35b61056e6004803603810190610569919061225e565b611182565b60405161057b91906124c8565b60405180910390f35b61059e6004803603810190610599919061225e565b6111ed565b6040516105ab91906124c8565b60405180910390f35b6105ce60048036038101906105c991906121e3565b61120e565b6040516105db91906124c8565b60405180910390f35b6105fe60048036038101906105f9919061212f565b611243565b60405161060b91906124c8565b60405180910390f35b61061c6112eb565b60405161062991906123da565b60405180910390f35b61063a61140d565b60405161064791906123da565b60405180910390f35b6106586115b4565b60405161066591906123bf565b60405180910390f35b6106766115da565b60405161068391906123da565b60405180910390f35b610694611750565b6040516106a191906124c8565b60405180910390f35b6106b2611756565b6040516106bf9190612410565b60405180910390f35b6106e260048036038101906106dd919061212f565b6117e4565b6040516106ef91906123da565b60405180910390f35b610712600480360381019061070d91906121e3565b6118a1565b60405161071f91906124c8565b60405180910390f35b610742600480360381019061073d91906121a7565b6118cd565b60405161074f91906123da565b60405180910390f35b610760611963565b60405161076d91906124c8565b60405180910390f35b610790600480360381019061078b91906121e3565b611987565b60405161079d91906124c8565b60405180910390f35b6107c060048036038101906107bb9190612287565b61199b565b6040516107cd91906124c8565b60405180910390f35b6107de611a57565b6040516107eb9190612492565b60405180910390f35b6107fc611ac1565b60405161080991906124c8565b60405180910390f35b61082c6004803603810190610827919061212f565b611ae5565b60405161083991906123da565b60405180910390f35b600063c6bb4b707c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561089757600190506109e8565b63449a52f87c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156108ea57600190506109e8565b6301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561093d57600190506109e8565b639493f8b27c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561099057600190506109e8565b6337a47be47c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156109e357600190506109e8565b600090505b919050565b600680546109fa906126f3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a26906126f3565b8015610a735780601f10610a4857610100808354040283529160200191610a73565b820191906000526020600020905b815481529060010190602001808311610a5657829003601f168201915b505050505081565b600080610a866115da565b50610a9083611182565b905080600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b1e91906124ff565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610b8291906124c8565b60405180910390a3600191505092915050565b600260009054906101000a90046fffffffffffffffffffffffffffffffff1681565b60095481565b60008080549050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000610bfa6115da565b50610c0484611182565b915081600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610c8f57600080fd5b610c9a868684611b87565b90508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610cf991906124c8565b60405180910390a380925050509392505050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610d9657503373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b610d9f57600080fd5b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000806000620f42409150620f42406a52b7d2dcc80cd2e4000000610e259190612586565b7f0000000000000000000000000000000000000000000000000000000000000000610e509190612555565b905060005b84811015610e9757620f42408284610e6d9190612586565b610e779190612555565b83610e8291906125e0565b92508080610e8f90612725565b915050610e55565b50620f42408583610ea89190612586565b610eb29190612555565b9250505092915050565b60085481565b60008181548110610ed257600080fd5b906000526020600020016000915090505481565b600080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90612452565b60405180910390fd5b600a5460095484610f8691906124ff565b1115610fc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fbe90612432565b60405180910390fd5b610fcf6115da565b508290508260096000828254610fe591906124ff565b92505081905550610ff68482611bc8565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f88560405161105491906124c8565b60405180910390a3611064611c8d565b50600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60007f0000000000000000000000000000000000000000000000000000000000000000826110e79190612586565b7f000000000000000000000000000000000000000000000000000000000000000061111291906124ff565b9050919050565b6000603c824261112991906125e0565b6111339190612555565b9050919050565b600b5481565b60035481565b600064e8d4a51000826111599190612555565b6a52b7d2dcc80cd2e400000061116f91906125e0565b8361117a9190612586565b905092915050565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1664e8d4a510006a52b7d2dcc80cd2e4000000846111d29190612586565b6111dc9190612586565b6111e69190612555565b9050919050565b6000603c82426111fd91906125e0565b6112079190612555565b9050919050565b6000608c60ff16750ffffffff00000000000000000000000000000000000836001900416908060020a82049150509050919050565b60008060008061125285611070565b925061125f600354611119565b905061129b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1682610e00565b6fffffffffffffffffffffffffffffffff16915064e8d4a510006a52b7d2dcc80cd2e40000006112cb9190612586565b82846112d79190612586565b6112e19190612555565b9350505050919050565b6000806000806112fc600354611119565b91506000821415611313576000935050505061140a565b600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1690506113508183610e00565b600260006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550603c826113959190612586565b6003546113a291906124ff565b60038190555080826003547fa0717e54e02bd9829db5e6e998aec0ae9de796b8d150a3cc46a92ab869697755600260009054906101000a90046fffffffffffffffffffffffffffffffff166040516113fa91906124ad565b60405180910390a4600193505050505b90565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461146a57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060008060008060006115f0611d85565b9750600060010288141561160f5760009850505050505050505061174d565b61161888611987565b955060018661162791906124ff565b9050611632866110b9565b915061163c6112eb565b50600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169450611679826111ed565b925060008311156116ab576a52b7d2dcc80cd2e400000061169a868561199b565b6116a49190612555565b93506116c5565b6a52b7d2dcc80cd2e4000000856116c29190612555565b93505b6116d460008560095484611eb5565b9650600087908060018154018082558091505060019003906000526020600020016000909190919091505561170888611f1d565b507f55d243082e019fce4009ccea5368b92e436c17586a1e793c7deda16df4e5d6758160405161173891906124c8565b60405180910390a16001985050505050505050505b90565b600a5481565b60078054611763906126f3565b80601f016020809104026020016040519081016040528092919081815260200182805461178f906126f3565b80156117dc5780601f106117b1576101008083540402835291602001916117dc565b820191906000526020600020905b8154815290600101906020018083116117bf57829003601f168201915b505050505081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461184057600080fd5b6001600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060019050919050565b6000602060ff166cffffffffffffffffff00000000836001900416908060020a82049150509050919050565b60008060006118da6115da565b506118e484611182565b91506118f1338684611b87565b90508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405161195091906124c8565b60405180910390a3809250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600063ffffffff8260019004169050919050565b6000806000620f42409150620f42406a52b7d2dcc80cd2e40000006119c09190612586565b7f00000000000000000000000000000000000000000000000000000000000000006119eb9190612555565b905060005b84811015611a3257620f42408284611a089190612586565b611a129190612555565b83611a1d91906124ff565b92508080611a2a90612725565b9150506119f0565b50620f42408583611a439190612586565b611a4d9190612555565b9250505092915050565b600060017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042611aa891906125e0565b611ab29190612555565b611abc91906124ff565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611b4157600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b600080611b948584611fbe565b50611b9f8484611bc8565b50611ba8611a57565b6fffffffffffffffffffffffffffffffff16905060019150509392505050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000851415611c255760009350505050611c87565b611c2e86611070565b92508483611c3c91906124ff565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000806000611c9f600954600161199b565b905060006001600080549050611cb591906125e0565b81548110611cec577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001546001900491506cffffffffffffffffff000000001982169150602060ff16819060020a02821791508160010260006001600080549050611d3791906125e0565b81548110611d6e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020018190555060019250505090565b6000806000806001600080549050611d9d91906125e0565b81548110611dd4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015491503073ffffffffffffffffffffffffffffffffffffffff1663e80952956040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015611e4357600080fd5b505afa158015611e57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7b9190612235565b6fffffffffffffffffffffffffffffffff169050611e9882611987565b8111611eac57600060010292505050611eb2565b81925050505b90565b600080750ffffffff00000000000000000000000000000000000608c60ff16869060020a0216600102811790506cffffffffffffffffff00000000602060ff16859060020a02166001028117905063ffffffff83166001028117905080915050949350505050565b6000806000611f2b846118a1565b9150611f6782600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16611146565b9050611fb3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611fae6a52b7d2dcc80cd2e400000084611fa99190612555565b611182565b611bc8565b508092505050919050565b600080600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600085141561201b57600093505050506120c0565b61202486611070565b925084831015612069576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161206090612472565b60405180910390fd5b848361207591906125e0565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600193505050505b92915050565b6000813590506120d581612887565b92915050565b6000813590506120ea8161289e565b92915050565b6000813590506120ff816128b5565b92915050565b600081519050612114816128cc565b92915050565b600081359050612129816128e3565b92915050565b60006020828403121561214157600080fd5b600061214f848285016120c6565b91505092915050565b60008060006060848603121561216d57600080fd5b600061217b868287016120c6565b935050602061218c868287016120c6565b925050604061219d8682870161211a565b9150509250925092565b600080604083850312156121ba57600080fd5b60006121c8858286016120c6565b92505060206121d98582860161211a565b9150509250929050565b6000602082840312156121f557600080fd5b6000612203848285016120db565b91505092915050565b60006020828403121561221e57600080fd5b600061222c848285016120f0565b91505092915050565b60006020828403121561224757600080fd5b600061225584828501612105565b91505092915050565b60006020828403121561227057600080fd5b600061227e8482850161211a565b91505092915050565b6000806040838503121561229a57600080fd5b60006122a88582860161211a565b92505060206122b98582860161211a565b9150509250929050565b6122cc81612614565b82525050565b6122db81612626565b82525050565b6122ea81612632565b82525050565b60006122fb826124e3565b61230581856124ee565b93506123158185602086016126c0565b61231e816127fb565b840191505092915050565b60006123366007836124ee565b91506123418261280c565b602082019050919050565b6000612359600a836124ee565b915061236482612835565b602082019050919050565b600061237c600d836124ee565b91506123878261285e565b602082019050919050565b61239b81612668565b82525050565b6123aa816126ae565b82525050565b6123b9816126a4565b82525050565b60006020820190506123d460008301846122c3565b92915050565b60006020820190506123ef60008301846122d2565b92915050565b600060208201905061240a60008301846122e1565b92915050565b6000602082019050818103600083015261242a81846122f0565b905092915050565b6000602082019050818103600083015261244b81612329565b9050919050565b6000602082019050818103600083015261246b8161234c565b9050919050565b6000602082019050818103600083015261248b8161236f565b9050919050565b60006020820190506124a76000830184612392565b92915050565b60006020820190506124c260008301846123a1565b92915050565b60006020820190506124dd60008301846123b0565b92915050565b600081519050919050565b600082825260208201905092915050565b600061250a826126a4565b9150612515836126a4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561254a5761254961276e565b5b828201905092915050565b6000612560826126a4565b915061256b836126a4565b92508261257b5761257a61279d565b5b828204905092915050565b6000612591826126a4565b915061259c836126a4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156125d5576125d461276e565b5b828202905092915050565b60006125eb826126a4565b91506125f6836126a4565b9250828210156126095761260861276e565b5b828203905092915050565b600061261f82612684565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006126b982612668565b9050919050565b60005b838110156126de5780820151818401526020810190506126c3565b838111156126ed576000848401525b50505050565b6000600282049050600182168061270b57607f821691505b6020821081141561271f5761271e6127cc565b5b50919050565b6000612730826126a4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156127635761276261276e565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f4552525f43415000000000000000000000000000000000000000000000000000600082015250565b7f4552525f41434345535300000000000000000000000000000000000000000000600082015250565b7f4552525f4f5645525350454e4400000000000000000000000000000000000000600082015250565b61289081612614565b811461289b57600080fd5b50565b6128a781612632565b81146128b257600080fd5b50565b6128be8161263c565b81146128c957600080fd5b50565b6128d581612668565b81146128e057600080fd5b50565b6128ec816126a4565b81146128f757600080fd5b5056fea26469706673582212204aa24cd44bbc01fc24170fdc3f01dba50f80b13edd1a1c51b7873d15eaa70ce664736f6c63430008040033 \ No newline at end of file diff --git a/python/examples/sim_noredistribute.py b/python/examples/sim_noredistribute.py index 24ca9f0..5ff7b5a 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 = 60*24*7*4 chain = 'evm:foochain:42' cap = (10 ** 6) * (10 ** 12) diff --git a/solidity/DemurrageTokenSingleCap.sol b/solidity/DemurrageTokenSingleCap.sol index 4416349..544485f 100644 --- 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 = 140; - uint256 constant maskRedistributionDemurrage = 0x000000000000000000000000fffff00000000000000000000000000000000000; // ((1 << 20) - 1) << 140 + uint256 constant maskRedistributionDemurrage = 0x000000000000000000000ffffffff00000000000000000000000000000000000; // ((1 << 20) - 1) << 140 // Account balances mapping (address => uint256) account; @@ -50,7 +50,7 @@ contract DemurrageTokenSingleCap { // 128 bit resolution of the demurrage divisor // (this constant x 1000000 is contained within 128 bits) - uint256 constant ppmDivider = 100000000000000000000000000; // now nanodivider, 6 zeros less + uint256 constant nanoDivider = 100000000000000000000000000; // now nanodivider, 6 zeros less // Timestamp of start of periods (time which contract constructor was called) uint256 public immutable periodStart; @@ -108,10 +108,10 @@ contract DemurrageTokenSingleCap { demurrageTimestamp = block.timestamp; periodStart = demurrageTimestamp; periodDuration = _periodMinutes * 60; - demurrageAmount = uint128(ppmDivider * 1000000000000); // Represents 38 decimal places + demurrageAmount = uint128(nanoDivider * 1000000000000); // Represents 38 decimal places //demurragePeriod = 1; taxLevel = _taxLevelMinute; // Represents 38 decimal places - bytes32 initialRedistribution = toRedistribution(0, 1000000, 0, 1); + bytes32 initialRedistribution = toRedistribution(0, 10000000000000000000, 0, 1); redistributions.push(initialRedistribution); // Misc settings @@ -147,7 +147,7 @@ contract DemurrageTokenSingleCap { currentDemurragedAmount = uint128(decayBy(demurrageAmount, periodCount)); - return (baseBalance * currentDemurragedAmount) / (ppmDivider * 1000000000000); + return (baseBalance * currentDemurragedAmount) / (nanoDivider * 1000000000000); } /// Balance unmodified by demurrage @@ -271,7 +271,7 @@ contract DemurrageTokenSingleCap { } function getDistribution(uint256 _supply, uint256 _demurrageAmount) public view returns (uint256) { - return _supply * (ppmDivider - (_demurrageAmount / 1000000000000)); + return _supply * (nanoDivider - (_demurrageAmount / 1000000000000)); } // Returns the amount sent to the sink address @@ -281,7 +281,7 @@ contract DemurrageTokenSingleCap { redistributionSupply = toRedistributionSupply(_redistribution); unit = getDistribution(redistributionSupply, demurrageAmount); - increaseBaseBalance(sinkAddress, toBaseAmount(unit / ppmDivider)); + increaseBaseBalance(sinkAddress, toBaseAmount(unit / nanoDivider)); return unit; } @@ -346,9 +346,9 @@ contract DemurrageTokenSingleCap { demurrageCounts = demurrageCycles(periodTimestamp); if (demurrageCounts > 0) { - nextRedistributionDemurrage = growBy(currentDemurrageAmount, demurrageCounts) / ppmDivider; + nextRedistributionDemurrage = growBy(currentDemurrageAmount, demurrageCounts) / nanoDivider; } else { - nextRedistributionDemurrage = currentDemurrageAmount / ppmDivider; + nextRedistributionDemurrage = currentDemurrageAmount / nanoDivider; } nextRedistribution = toRedistribution(0, nextRedistributionDemurrage, totalSupply, nextPeriod); @@ -365,7 +365,7 @@ contract DemurrageTokenSingleCap { uint256 truncatedTaxLevel; valueFactor = 1000000; - truncatedTaxLevel = taxLevel / (ppmDivider * 1000000); + truncatedTaxLevel = taxLevel / (nanoDivider * 1000000); for (uint256 i = 0; i < _period; i++) { valueFactor = valueFactor + ((valueFactor * truncatedTaxLevel) / 1000000); @@ -380,7 +380,7 @@ contract DemurrageTokenSingleCap { uint256 truncatedTaxLevel; valueFactor = 1000000; - truncatedTaxLevel = taxLevel / (ppmDivider * 1000000); + truncatedTaxLevel = taxLevel / (nanoDivider * 1000000); for (uint256 i = 0; i < _period; i++) { valueFactor = valueFactor - ((valueFactor * truncatedTaxLevel) / 1000000); @@ -390,7 +390,7 @@ contract DemurrageTokenSingleCap { // Inflates the given amount according to the current demurrage modifier function toBaseAmount(uint256 _value) public view returns (uint256) { - return (_value * ppmDivider * 1000000000000) / demurrageAmount; + return (_value * nanoDivider * 1000000000000) / demurrageAmount; } // Implements ERC20, triggers tax and/or redistribution