UNPKG

@gnosis.pm/pm-contracts

Version:

Collection of smart contracts for the Gnosis prediction market platform

541 lines (540 loc) 1.31 MB
{ "contractName": "Fixed192x64Math", "abi": [ { "constant": true, "inputs": [], "name": "LN2", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "LOG2_E", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "ONE", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "x", "type": "int256" } ], "name": "exp", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "x", "type": "int256" }, { "name": "estimationMode", "type": "Fixed192x64Math.EstimationMode" } ], "name": "pow2", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "x", "type": "int256" } ], "name": "pow2Bounds", "outputs": [ { "name": "lower", "type": "uint256" }, { "name": "upper", "type": "uint256" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "x", "type": "uint256" } ], "name": "ln", "outputs": [ { "name": "", "type": "int256" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "x", "type": "uint256" }, { "name": "estimationMode", "type": "Fixed192x64Math.EstimationMode" } ], "name": "binaryLog", "outputs": [ { "name": "", "type": "int256" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "x", "type": "uint256" } ], "name": "log2Bounds", "outputs": [ { "name": "lower", "type": "int256" }, { "name": "upper", "type": "int256" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "x", "type": "uint256" } ], "name": "floorLog2", "outputs": [ { "name": "lo", "type": "int256" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "nums", "type": "int256[]" } ], "name": "max", "outputs": [ { "name": "maxNum", "type": "int256" } ], "payable": false, "stateMutability": "pure", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.6+commit.b259423e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"LN2\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"x\",\"type\":\"uint256\"},{\"name\":\"estimationMode\",\"type\":\"Fixed192x64Math.EstimationMode\"}],\"name\":\"binaryLog\",\"outputs\":[{\"name\":\"\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"x\",\"type\":\"uint256\"}],\"name\":\"log2Bounds\",\"outputs\":[{\"name\":\"lower\",\"type\":\"int256\"},{\"name\":\"upper\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"x\",\"type\":\"int256\"},{\"name\":\"estimationMode\",\"type\":\"Fixed192x64Math.EstimationMode\"}],\"name\":\"pow2\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"LOG2_E\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"x\",\"type\":\"uint256\"}],\"name\":\"ln\",\"outputs\":[{\"name\":\"\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"x\",\"type\":\"uint256\"}],\"name\":\"floorLog2\",\"outputs\":[{\"name\":\"lo\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"x\",\"type\":\"int256\"}],\"name\":\"pow2Bounds\",\"outputs\":[{\"name\":\"lower\",\"type\":\"uint256\"},{\"name\":\"upper\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"ONE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"nums\",\"type\":\"int256[]\"}],\"name\":\"max\",\"outputs\":[{\"name\":\"maxNum\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"x\",\"type\":\"int256\"}],\"name\":\"exp\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Alan Lu - <alan.lu@gnosis.pm>Stefan George - <stefan@gnosis.pm>\",\"methods\":{\"binaryLog(uint256,Fixed192x64Math.EstimationMode)\":{\"details\":\"Returns estimate of binaryLog(x) given x\",\"params\":{\"estimationMode\":\"whether to return a lower bound, upper bound, or a midpoint\",\"x\":\"logarithm argument in fixed point\"},\"return\":\"estimate of binaryLog(x) in fixed point\"},\"exp(int256)\":{\"details\":\"Returns natural exponential function value of given x\",\"params\":{\"x\":\"x\"},\"return\":\"e**x\"},\"floorLog2(uint256)\":{\"details\":\"Returns base 2 logarithm value of given x\",\"params\":{\"x\":\"x\"},\"return\":\"logarithmic value\"},\"ln(uint256)\":{\"details\":\"Returns natural logarithm value of given x\",\"params\":{\"x\":\"x\"},\"return\":\"ln(x)\"},\"log2Bounds(uint256)\":{\"details\":\"Returns bounds for value of binaryLog(x) given x\",\"params\":{\"x\":\"logarithm argument in fixed point\"},\"return\":\"{ \\\"lower\\\": \\\"lower bound of binaryLog(x) in fixed point\\\", \\\"upper\\\": \\\"upper bound of binaryLog(x) in fixed point\\\" }\"},\"max(int256[])\":{\"details\":\"Returns maximum of an array\",\"params\":{\"nums\":\"Numbers to look through\"},\"return\":\"Maximum number\"},\"pow2(int256,Fixed192x64Math.EstimationMode)\":{\"details\":\"Returns estimate of 2**x given x\",\"params\":{\"estimationMode\":\"whether to return a lower bound, upper bound, or a midpoint\",\"x\":\"exponent in fixed point\"},\"return\":\"estimate of 2**x in fixed point\"},\"pow2Bounds(int256)\":{\"details\":\"Returns bounds for value of 2**x given x\",\"params\":{\"x\":\"exponent in fixed point\"},\"return\":\"{ \\\"lower\\\": \\\"lower bound of 2**x in fixed point\\\", \\\"upper\\\": \\\"upper bound of 2**x in fixed point\\\" }\"}},\"title\":\"Fixed192x64Math library - Allows calculation of logarithmic and exponential functions\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol\":\"Fixed192x64Math\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol\":{\"keccak256\":\"0xad15b641bf8f5862034749b679ab91cb2c330c2ca997da4455863dc169ab82d4\",\"urls\":[\"bzzr://a37b3d23f367b7f0ba4669c417af754260f0dbedad21294079aed622222427f5\"]}},\"version\":1}", "bytecode": "0x610d1e610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100b35760003560e01c806324d4e90a1161007b57806324d4e90a146101db57806345b8bafc1461021d578063c12662271461025f578063c2ee3a08146102a8578063ccc13814146102c6578063e46751e314610392576100b3565b806302780677146100b8578063137bf798146100d65780631427f168146101255780631d5801231461016e57806324902e24146101bd575b600080fd5b6100c06103d4565b6040518082815260200191505060405180910390f35b61010f600480360360408110156100ec57600080fd5b8101908080359060200190929190803560ff1690602001909291905050506103e0565b6040518082815260200191505060405180910390f35b6101516004803603602081101561013b57600080fd5b8101908080359060200190929190505050610485565b604051808381526020018281526020019250505060405180910390f35b6101a76004803603604081101561018457600080fd5b8101908080359060200190929190803560ff169060200190929190505050610563565b6040518082815260200191505060405180910390f35b6101c5610608565b6040518082815260200191505060405180910390f35b610207600480360360208110156101f157600080fd5b8101908080359060200190929190505050610615565b6040518082815260200191505060405180910390f35b6102496004803603602081101561023357600080fd5b810190808035906020019092919050505061065c565b6040518082815260200191505060405180910390f35b61028b6004803603602081101561027557600080fd5b8101908080359060200190929190505050610705565b604051808381526020018281526020019250505060405180910390f35b6102b0610bd2565b6040518082815260200191505060405180910390f35b61037c600480360360208110156102dc57600080fd5b81019080803590602001906401000000008111156102f957600080fd5b82018360208201111561030b57600080fd5b8035906020019184602083028401116401000000008311171561032d57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610bdf565b6040518082815260200191505060405180910390f35b6103be600480360360208110156103a857600080fd5b8101908080359060200190929190505050610c65565b6040518082815260200191505060405180910390f35b67b17217f7d1cf79ac81565b60008060006103ee85610485565b91509150600060028111156103ff57fe5b84600281111561040b57fe5b141561041b57819250505061047f565b6001600281111561042857fe5b84600281111561043457fe5b141561044457809250505061047f565b60028081111561045057fe5b84600281111561045c57fe5b141561047a578160028383038161046f57fe5b05019250505061047f565b600080fd5b92915050565b6000806000831161049557600080fd5b61049e8361065c565b91506000808312156104b8578260000384901b90506104bf565b8284901c90505b68010000000000000000830292506000600190505b6040811361055357680100000000000000008214156104f257610553565b680100000000000000008283028161050657fe5b049150680100000000000000006002028210610546578068010000000000000000600082121561053257fe5b901c840193506002828161054257fe5b0491505b80806001019150506104d4565b5082600484019250925050915091565b600080600061057185610705565b915091506000600281111561058257fe5b84600281111561058e57fe5b141561059e578192505050610602565b600160028111156105ab57fe5b8460028111156105b757fe5b14156105c7578092505050610602565b6002808111156105d357fe5b8460028111156105df57fe5b14156105fd57816002838303816105f257fe5b040192505050610602565b600080fd5b92915050565b680171547652b82fe17781565b600080600061062384610485565b91509150680171547652b82fe177680100000000000000008360028585038161064857fe5b0501028161065257fe5b0592505050919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc09050600060c1905060006001838301901d90505b816001840112156106fe576000811280156106bc5750680100000000000000008160000385901b105b806106df5750600081121580156106de5750680100000000000000008185901c105b5b156106ec578091506106f0565b8092505b6001838301901d9050610693565b5050919050565b60008068bfffffffffffffffff83131561071e57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc00000000000000000831215610759576000600181915080905091509150610bcd565b600080600085126107935768010000000000000000858161077657fe5b05915068010000000000000000858161078b57fe5b0790506107bf565b60016801000000000000000060018701816107aa57fe5b05039150816801000000000000000002850390505b60008112156107ca57fe5b6000604068010000000000000000901b905060008290508067b17217f7d1cf79ab0282019150680100000000000000008382028161080457fe5b05905060028167f5fdeffc162c754302901d82019150680100000000000000008382028161082e57fe5b05905060048167e35846b82505fc5902901d82019150680100000000000000008382028161085857fe5b059050600681679d955b7dd273b94e02901d82019150680100000000000000008382028161088257fe5b05905060098167aec3ff3c5339888302901d8201915068010000000000000000838202816108ac57fe5b059050600c8167a184897c363c3b7a02901d8201915068010000000000000000838202816108d657fe5b05905060108167ffe5fe2c4586343502901d82019150680100000000000000008382028161090057fe5b05905060138167b160111d2e411fec02901d82019150680100000000000000008382028161092a57fe5b05905060178167da929e9caf3e1ed202901d82019150680100000000000000008382028161095457fe5b059050601b8167f267a8ac5c764fb702901d82019150680100000000000000008382028161097e57fe5b059050601f8167f465639a8dd9260702901d8201915068010000000000000000838202816109a857fe5b05905060238167e1deb287e14c2f1502901d8201915068010000000000000000838202816109d257fe5b05905060278167c0b0c98b3687cb1402901d8201915068010000000000000000838202816109fc57fe5b059050602b816798a4b26ac3c54b9f02901d820191506801000000000000000083820281610a2657fe5b05905060308167e1b7421d82010f3302901d820191506801000000000000000083820281610a5057fe5b059050603481679c744d73cfc59c9102901d820191506801000000000000000083820281610a7a57fe5b05905060398167cc2225a0e12d3eab02901d820191506801000000000000000083820281610aa457fe5b059050603e8167fb8bb5eda1b4aeb902901d9050808201915068010000000000000000600802905060408403935060008412610b925760008461010003836000821215610aed57fe5b901d1415610b5d5783826000821215610b0257fe5b901b955083816000821215610b1357fe5b901b90508581870110610b2a578086019450610b4e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94505b85859550955050505050610bcd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808191508090509550955050505050610bcd565b600184600003826000821215610ba457fe5b901d01905083600003826000821215610bb957fe5b901c95508086019450858595509550505050505b915091565b6801000000000000000081565b600080825111610bee57600080fd5b7f8000000000000000000000000000000000000000000000000000000000000000905060008090505b8251811015610c5f5781838281518110610c2d57fe5b60200260200101511315610c5257828181518110610c4757fe5b602002602001015191505b8080600101915050610c17565b50919050565b600068851591f9dd5b9b40d7821315610c7d57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffd3a37a020b8c21950d8213610cad5760009050610ced565b600080610cd567b17217f7d1cf79ac68010000000000000000860281610ccf57fe5b05610705565b9150915081600283830381610ce657fe5b0401925050505b91905056fea165627a7a723058205717b64c50bb0ce721560a65c4e1bc0424dcd75c26c9935056664ca1ee77b8460029", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100b35760003560e01c806324d4e90a1161007b57806324d4e90a146101db57806345b8bafc1461021d578063c12662271461025f578063c2ee3a08146102a8578063ccc13814146102c6578063e46751e314610392576100b3565b806302780677146100b8578063137bf798146100d65780631427f168146101255780631d5801231461016e57806324902e24146101bd575b600080fd5b6100c06103d4565b6040518082815260200191505060405180910390f35b61010f600480360360408110156100ec57600080fd5b8101908080359060200190929190803560ff1690602001909291905050506103e0565b6040518082815260200191505060405180910390f35b6101516004803603602081101561013b57600080fd5b8101908080359060200190929190505050610485565b604051808381526020018281526020019250505060405180910390f35b6101a76004803603604081101561018457600080fd5b8101908080359060200190929190803560ff169060200190929190505050610563565b6040518082815260200191505060405180910390f35b6101c5610608565b6040518082815260200191505060405180910390f35b610207600480360360208110156101f157600080fd5b8101908080359060200190929190505050610615565b6040518082815260200191505060405180910390f35b6102496004803603602081101561023357600080fd5b810190808035906020019092919050505061065c565b6040518082815260200191505060405180910390f35b61028b6004803603602081101561027557600080fd5b8101908080359060200190929190505050610705565b604051808381526020018281526020019250505060405180910390f35b6102b0610bd2565b6040518082815260200191505060405180910390f35b61037c600480360360208110156102dc57600080fd5b81019080803590602001906401000000008111156102f957600080fd5b82018360208201111561030b57600080fd5b8035906020019184602083028401116401000000008311171561032d57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610bdf565b6040518082815260200191505060405180910390f35b6103be600480360360208110156103a857600080fd5b8101908080359060200190929190505050610c65565b6040518082815260200191505060405180910390f35b67b17217f7d1cf79ac81565b60008060006103ee85610485565b91509150600060028111156103ff57fe5b84600281111561040b57fe5b141561041b57819250505061047f565b6001600281111561042857fe5b84600281111561043457fe5b141561044457809250505061047f565b60028081111561045057fe5b84600281111561045c57fe5b141561047a578160028383038161046f57fe5b05019250505061047f565b600080fd5b92915050565b6000806000831161049557600080fd5b61049e8361065c565b91506000808312156104b8578260000384901b90506104bf565b8284901c90505b68010000000000000000830292506000600190505b6040811361055357680100000000000000008214156104f257610553565b680100000000000000008283028161050657fe5b049150680100000000000000006002028210610546578068010000000000000000600082121561053257fe5b901c840193506002828161054257fe5b0491505b80806001019150506104d4565b5082600484019250925050915091565b600080600061057185610705565b915091506000600281111561058257fe5b84600281111561058e57fe5b141561059e578192505050610602565b600160028111156105ab57fe5b8460028111156105b757fe5b14156105c7578092505050610602565b6002808111156105d357fe5b8460028111156105df57fe5b14156105fd57816002838303816105f257fe5b040192505050610602565b600080fd5b92915050565b680171547652b82fe17781565b600080600061062384610485565b91509150680171547652b82fe177680100000000000000008360028585038161064857fe5b0501028161065257fe5b0592505050919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc09050600060c1905060006001838301901d90505b816001840112156106fe576000811280156106bc5750680100000000000000008160000385901b105b806106df5750600081121580156106de5750680100000000000000008185901c105b5b156106ec578091506106f0565b8092505b6001838301901d9050610693565b5050919050565b60008068bfffffffffffffffff83131561071e57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc00000000000000000831215610759576000600181915080905091509150610bcd565b600080600085126107935768010000000000000000858161077657fe5b05915068010000000000000000858161078b57fe5b0790506107bf565b60016801000000000000000060018701816107aa57fe5b05039150816801000000000000000002850390505b60008112156107ca57fe5b6000604068010000000000000000901b905060008290508067b17217f7d1cf79ab0282019150680100000000000000008382028161080457fe5b05905060028167f5fdeffc162c754302901d82019150680100000000000000008382028161082e57fe5b05905060048167e35846b82505fc5902901d82019150680100000000000000008382028161085857fe5b059050600681679d955b7dd273b94e02901d82019150680100000000000000008382028161088257fe5b05905060098167aec3ff3c5339888302901d8201915068010000000000000000838202816108ac57fe5b059050600c8167a184897c363c3b7a02901d8201915068010000000000000000838202816108d657fe5b05905060108167ffe5fe2c4586343502901d82019150680100000000000000008382028161090057fe5b05905060138167b160111d2e411fec02901d82019150680100000000000000008382028161092a57fe5b05905060178167da929e9caf3e1ed202901d82019150680100000000000000008382028161095457fe5b059050601b8167f267a8ac5c764fb702901d82019150680100000000000000008382028161097e57fe5b059050601f8167f465639a8dd9260702901d8201915068010000000000000000838202816109a857fe5b05905060238167e1deb287e14c2f1502901d8201915068010000000000000000838202816109d257fe5b05905060278167c0b0c98b3687cb1402901d8201915068010000000000000000838202816109fc57fe5b059050602b816798a4b26ac3c54b9f02901d820191506801000000000000000083820281610a2657fe5b05905060308167e1b7421d82010f3302901d820191506801000000000000000083820281610a5057fe5b059050603481679c744d73cfc59c9102901d820191506801000000000000000083820281610a7a57fe5b05905060398167cc2225a0e12d3eab02901d820191506801000000000000000083820281610aa457fe5b059050603e8167fb8bb5eda1b4aeb902901d9050808201915068010000000000000000600802905060408403935060008412610b925760008461010003836000821215610aed57fe5b901d1415610b5d5783826000821215610b0257fe5b901b955083816000821215610b1357fe5b901b90508581870110610b2a578086019450610b4e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94505b85859550955050505050610bcd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808191508090509550955050505050610bcd565b600184600003826000821215610ba457fe5b901d01905083600003826000821215610bb957fe5b901c95508086019450858595509550505050505b915091565b6801000000000000000081565b600080825111610bee57600080fd5b7f8000000000000000000000000000000000000000000000000000000000000000905060008090505b8251811015610c5f5781838281518110610c2d57fe5b60200260200101511315610c5257828181518110610c4757fe5b602002602001015191505b8080600101915050610c17565b50919050565b600068851591f9dd5b9b40d7821315610c7d57600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffd3a37a020b8c21950d8213610cad5760009050610ced565b600080610cd567b17217f7d1cf79ac68010000000000000000860281610ccf57fe5b05610705565b9150915081600283830381610ce657fe5b0401925050505b91905056fea165627a7a723058205717b64c50bb0ce721560a65c4e1bc0424dcd75c26c9935056664ca1ee77b8460029", "sourceMap": "221:8804:28:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24", "deployedSourceMap": "221:8804:28:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;446:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6517:487;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6517:487:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;7280:744;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;7280:744:28;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;1508:484;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1508:484:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;497:49;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6060:200;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6060:200:28;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;8138:488;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;8138:488:28;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2234:3723;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2234:3723:28;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;393:47;;;:::i;:::-;;;;;;;;;;;;;;;;;;;8748:275;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;8748:275:28;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;8748:275:28;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8748:275:28;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;8748:275:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;8748:275:28;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;700:577;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;700:577:28;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;446:45;473:18;446:45;:::o;6517:487::-;6620:3;6640:9;6651;6664:13;6675:1;6664:10;:13::i;:::-;6639:38;;;;6708:25;6690:43;;;;;;;;:14;:43;;;;;;;;;6687:85;;;6756:5;6749:12;;;;;;6687:85;6802:25;6784:43;;;;;;;;:14;:43;;;;;;;;;6781:85;;;6850:5;6843:12;;;;;;6781:85;6896:23;6878:41;;;;;;;;:14;:41;;;;;;;;;6875:105;;;6964:5;6960:1;6951:5;6943;:13;6942:19;;;;;;:27;6935:34;;;;;;6875:105;6989:8;;;6517:487;;;;;:::o;7280:744::-;7353:9;7364;7401:1;7397;:5;7389:14;;;;;;7454:12;7464:1;7454:9;:12::i;:::-;7446:20;;7477:6;7505:1;7497:5;:9;7493:95;;;7535:5;7534:6;;7524:1;:17;;7520:21;;7493:95;;;7582:5;7572:1;:16;;7568:20;;7493:95;421:19;7599:17;;;;7744:5;7752:1;7744:9;;7739:243;7760:2;7755:1;:7;7739:243;;421:19;7786:1;:8;7783:51;;;7814:5;;7783:51;421:19;7855:1;7851;:5;:11;;;;;;7847:15;;421:19;7884:1;:7;7879:1;:12;7876:96;;7931:1;421:19;7924:8;;;;;;;;;;7911:22;;;;7956:1;7951:6;;;;;;;;;7876:96;7764:3;;;;;;;7739:243;;;;8000:5;8015:1;8007:5;:9;7992:25;;;;;7280:744;;;:::o;1508:484::-;1605:4;1626:10;1638;1652:13;1663:1;1652:10;:13::i;:::-;1625:40;;;;1696:25;1678:43;;;;;;;;:14;:43;;;;;;;;;1675:85;;;1744:5;1737:12;;;;;;1675:85;1790:25;1772:43;;;;;;;;:14;:43;;;;;;;;;1769:85;;;1838:5;1831:12;;;;;;1769:85;1884:23;1866:41;;;;;;;;:14;:41;;;;;;;;;1863:105;;;1952:5;1948:1;1939:5;1931;:13;1930:19;;;;;;:27;1923:34;;;;;;1863:105;1977:8;;;1508:484;;;;;:::o;497:49::-;527:19;497:49;:::o;6060:200::-;6125:3;6145:9;6156;6169:13;6180:1;6169:10;:13::i;:::-;6144:38;;;;527:19;421;6222:5;6218:1;6209:5;6201;:13;6200:19;;;;;;:27;6199:40;:54;;;;;;6192:61;;;;6060:200;;;:::o;8138:488::-;8210:6;8237:3;8232:8;;8250:6;8259:3;8250:12;;8365:7;8388:1;8381:2;8376;:7;8375:14;;8365:24;;8399:221;8416:2;8411:1;8406:2;:6;8405:13;8399:221;;;8444:1;8438:3;:7;:32;;;;;421:19;8460:3;8459:4;;8449:1;:15;;:21;8438:32;:68;;;;8481:1;8474:3;:8;;:32;;;;;421:19;8496:3;8486:1;:14;;:20;8474:32;8438:68;8434:141;;;8529:3;8524:8;;8434:141;;;8572:3;8567:8;;8434:141;8608:1;8601:2;8596;:7;8595:14;;8589:20;;8399:221;;;8138:488;;;;;:::o;2234:3723::-;2306:10;2318;2479:22;2474:1;:27;;2466:36;;;;;;2633:23;2629:1;:27;2625:58;;;2678:1;2681;2670:13;;;;;;;;;;;;2625:58;2858:9;2877:5;2901:1;2896;:6;2892:194;;421:19;2926:1;:12;;;;;;2918:20;;421:19;2956:1;:12;;;;;;2952:16;;2892:194;;;3034:1;421:19;3018:1;3016;:3;3015:16;;;;;;:20;3007:28;;3069:5;421:19;3058:16;3053:1;:22;3049:26;;2892:194;3107:1;3102;:6;;3095:14;;;;3577:10;3602:2;421:19;3590:14;;3577:27;;3614:8;3625:1;3614:12;;3667:4;3646:18;:25;3636:35;;;;421:19;3695:1;3688:4;:8;:19;;;;;;3681:26;;3757:7;3748:4;3727:18;:25;:38;;3717:48;;;;421:19;3789:1;3782:4;:8;:19;;;;;;3775:26;;3851:7;3842:4;3821:18;:25;:38;;3811:48;;;;421:19;3883:1;3876:4;:8;:19;;;;;;3869:26;;3945:7;3936:4;3915:18;:25;:38;;3905:48;;;;421:19;3977:1;3970:4;:8;:19;;;;;;3963:26;;4039:7;4030:4;4009:18;:25;:38;;3999:48;;;;421:19;4071:1;4064:4;:8;:19;;;;;;4057:26;;4133:7;4124:4;4103:18;:25;:38;;4093:48;;;;421:19;4165:1;4158:4;:8;:19;;;;;;4151:26;;4227:7;4218:4;4197:18;:25;:38;;4187:48;;;;421:19;4259:1;4252:4;:8;:19;;;;;;4245:26;;4321:7;4312:4;4291:18;:25;:38;;4281:48;;;;421:19;4353:1;4346:4;:8;:19;;;;;;4339:26;;4415:7;4406:4;4385:18;:25;:38;;4375:48;;;;421:19;4447:1;4440:4;:8;:19;;;;;;4433:26;;4509:7;4500:4;4479:18;:25;:38;;4469:48;;;;421:19;4541:1;4534:4;:8;:19;;;;;;4527:26;;4603:7;4594:4;4573:18;:25;:38;;4563:48;;;;421:19;4635:1;4628:4;:8;:19;;;;;;4621:26;;4697:7;4688:4;4667:18;:25;:38;;4657:48;;;;421:19;4729:1;4722:4;:8;:19;;;;;;4715:26;;4791:8;4782:4;4761:18;:25;:39;;4751:49;;;;421:19;4824:1;4817:4;:8;:19;;;;;;4810:26;;4886:8;4877:4;4856:18;:25;:39;;4846:49;;;;421:19;4919:1;4912:4;:8;:19;;;;;;4905:26;;4981:8;4972:4;4951:18;:25;:39;;4941:49;;;;421:19;5014:1;5007:4;:8;:19;;;;;;5000:26;;5076:8;5067:4;5046:18;:25;:39;;5036:49;;;;421:19;5109:1;5102:4;:8;:19;;;;;;5095:26;;5171:8;5162:4;5141:18;:25;:39;;5131:49;;;;421:19;5204:1;5197:4;:8;:19;;;;;;5190:26;;5263:8;5254:4;5233:18;:25;:39;;5226:46;;5292:4;5282:14;;;;421:19;5317:1;:7;5306:19;;5345:2;5336:11;;;;5370:1;5361:5;:10;5357:446;;5416:1;5406:5;5402:3;:9;5391:6;:21;;;;;;;;;;:26;5387:405;;;5461:5;5450:6;5445:21;;;;;;;;;;5437:29;;5493:5;5484:14;;;;;;;;;;;;;5565:5;5556:4;5543:5;:18;:27;5539:138;;5613:4;5600:5;:18;5592:26;;5539:138;;;5669:8;5661:16;;5539:138;5703:5;5710;5695:21;;;;;;;;;;5387:405;5773:8;5783;5765:27;;;;;;;;;;;;;;;;5357:446;5840:1;5830:5;5829:6;;5820:4;:16;;;;;;;;;;5819:22;5812:29;;5877:5;5876:6;;5864;5859:24;;;;;;;;;;5851:32;;5914:4;5901:5;:18;5893:26;;5937:5;5944;5929:21;;;;;;;;2234:3723;;;;:::o;393:47::-;421:19;393:47;:::o;8748:275::-;8825:10;8873:1;8859:4;:11;:15;8851:24;;;;;;8894:7;8885:16;;8916:6;8925:1;8916:10;;8911:105;8932:4;:11;8928:1;:15;8911:105;;;8976:6;8966:4;8971:1;8966:7;;;;;;;;;;;;;;:16;8962:54;;;9009:4;9014:1;9009:7;;;;;;;;;;;;;;9000:16;;8962:54;8945:3;;;;;;;8911:105;;;;8748:275;;;:::o;700:577::-;765:4;917:22;912:1;:27;;904:36;;;;;;1069:22;1064:1;:27;1060:53;;1112:1;1105:8;;;;1060:53;1165:10;1177;1191:35;473:18;421:19;1202:1;:12;:23;;;;;;1191:10;:35::i;:::-;1164:62;;;;1265:5;1261:1;1252:5;1244;:13;1243:19;;;;;;:27;1236:34;;;;700:577;;;;:::o", "source": "pragma solidity >=0.4.24 ^0.5.1;\n\n\n/// @title Fixed192x64Math library - Allows calculation of logarithmic and exponential functions\n/// @author Alan Lu - <alan.lu@gnosis.pm>\n/// @author Stefan George - <stefan@gnosis.pm>\nlibrary Fixed192x64Math {\n\n enum EstimationMode { LowerBound, UpperBound, Midpoint }\n\n /*\n * Constants\n */\n // This is equal to 1 in our calculations\n uint public constant ONE = 0x10000000000000000;\n uint public constant LN2 = 0xb17217f7d1cf79ac;\n uint public constant LOG2_E = 0x171547652b82fe177;\n\n /*\n * Public functions\n */\n /// @dev Returns natural exponential function value of given x\n /// @param x x\n /// @return e**x\n function exp(int x)\n public\n pure\n returns (uint)\n {\n // revert if x is > MAX_POWER, where\n // MAX_POWER = int(mp.floor(mp.log(mpf(2**256 - 1) / ONE) * ONE))\n require(x <= 2454971259878909886679);\n // return 0 if exp(x) is tiny, using\n // MIN_POWER = int(mp.floor(mp.log(mpf(1) / ONE) * ONE))\n if (x <= -818323753292969962227)\n return 0;\n\n // Transform so that e^x -> 2^x\n (uint lower, uint upper) = pow2Bounds(x * int(ONE) / int(LN2));\n return (upper - lower) / 2 + lower;\n }\n\n /// @dev Returns estimate of 2**x given x\n /// @param x exponent in fixed point\n /// @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n /// @return estimate of 2**x in fixed point\n function pow2(int x, EstimationMode estimationMode)\n public\n pure\n returns (uint)\n {\n (uint lower, uint upper) = pow2Bounds(x);\n if(estimationMode == EstimationMode.LowerBound) {\n return lower;\n }\n if(estimationMode == EstimationMode.UpperBound) {\n return upper;\n }\n if(estimationMode == EstimationMode.Midpoint) {\n return (upper - lower) / 2 + lower;\n }\n revert();\n }\n\n /// @dev Returns bounds for value of 2**x given x\n /// @param x exponent in fixed point\n /// @return {\n /// \"lower\": \"lower bound of 2**x in fixed point\",\n /// \"upper\": \"upper bound of 2**x in fixed point\"\n /// }\n function pow2Bounds(int x)\n public\n pure\n returns (uint lower, uint upper)\n {\n // revert if x is > MAX_POWER, where\n // MAX_POWER = int(mp.floor(mp.log(mpf(2**256 - 1) / ONE, 2) * ONE))\n require(x <= 3541774862152233910271);\n // return 0 if exp(x) is tiny, using\n // MIN_POWER = int(mp.floor(mp.log(mpf(1) / ONE, 2) * ONE))\n if (x < -1180591620717411303424)\n return (0, 1);\n\n // 2^x = 2^(floor(x)) * 2^(x-floor(x))\n // ^^^^^^^^^^^^^^ is a bit shift of ceil(x)\n // so Taylor expand on z = x-floor(x), z in [0, 1)\n int shift;\n int z;\n if (x >= 0) {\n shift = x / int(ONE);\n z = x % int(ONE);\n }\n else {\n shift = (x+1) / int(ONE) - 1;\n z = x - (int(ONE) * shift);\n }\n assert(z >= 0);\n // 2^x = 1 + (ln 2) x + (ln 2)^2/2! x^2 + ...\n //\n // Can generate the z coefficients using mpmath and the following lines\n // >>> from mpmath import mp\n // >>> mp.dps = 100\n // >>> coeffs = [mp.log(2)**i / mp.factorial(i) for i in range(1, 21)]\n // >>> shifts = [64 - int(mp.log(c, 2)) for c in coeffs]\n // >>> print('\\n'.join(hex(int(c * (1 << s))) + ', ' + str(s) for c, s in zip(coeffs, shifts)))\n int result = int(ONE) << 64;\n int zpow = z;\n result += 0xb17217f7d1cf79ab * zpow;\n zpow = zpow * z / int(ONE);\n result += 0xf5fdeffc162c7543 * zpow >> (66 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xe35846b82505fc59 * zpow >> (68 - 64);\n zpow = zpow * z / int(ONE);\n result += 0x9d955b7dd273b94e * zpow >> (70 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xaec3ff3c53398883 * zpow >> (73 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xa184897c363c3b7a * zpow >> (76 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xffe5fe2c45863435 * zpow >> (80 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xb160111d2e411fec * zpow >> (83 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xda929e9caf3e1ed2 * zpow >> (87 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xf267a8ac5c764fb7 * zpow >> (91 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xf465639a8dd92607 * zpow >> (95 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xe1deb287e14c2f15 * zpow >> (99 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xc0b0c98b3687cb14 * zpow >> (103 - 64);\n zpow = zpow * z / int(ONE);\n result += 0x98a4b26ac3c54b9f * zpow >> (107 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xe1b7421d82010f33 * zpow >> (112 - 64);\n zpow = zpow * z / int(ONE);\n result += 0x9c744d73cfc59c91 * zpow >> (116 - 64);\n zpow = zpow * z / int(ONE);\n result += 0xcc2225a0e12d3eab * zpow >> (121 - 64);\n zpow = zpow * z / int(ONE);\n zpow = 0xfb8bb5eda1b4aeb9 * zpow >> (126 - 64);\n result += zpow;\n zpow = int(8 * ONE);\n\n shift -= 64;\n if (shift >= 0) {\n if (result >> (256-shift) == 0) {\n lower = uint(result) << shift;\n zpow <<= shift; // todo: is this safe?\n if (lower + uint(zpow) >= lower)\n upper = lower + uint(zpow);\n else\n upper = 2**256-1;\n return (lower, upper);\n }\n else\n return (2**256-1, 2**256-1);\n }\n zpow = (zpow >> (-shift)) + 1;\n lower = uint(result) >> (-shift);\n upper = lower + uint(zpow);\n return (lower, upper);\n }\n\n /// @dev Returns natural logarithm value of given x\n /// @param x x\n /// @return ln(x)\n function ln(uint x)\n public\n pure\n returns (int)\n {\n (int lower, int upper) = log2Bounds(x);\n return ((upper - lower) / 2 + lower) * int(ONE) / int(LOG2_E);\n }\n\n /// @dev Returns estimate of binaryLog(x) given x\n /// @param x logarithm argument in fixed point\n /// @param estimationMode whether to return a lower bound, upper bound, or a midpoint\n /// @return estimate of binaryLog(x) in fixed point\n function binaryLog(uint x, EstimationMode estimationMode)\n public\n pure\n returns (int)\n {\n (int lower, int upper) = log2Bounds(x);\n if(estimationMode == EstimationMode.LowerBound) {\n return lower;\n }\n if(estimationMode == EstimationMode.UpperBound) {\n return upper;\n }\n if(estimationMode == EstimationMode.Midpoint) {\n return (upper - lower) / 2 + lower;\n }\n revert();\n }\n\n /// @dev Returns bounds for value of binaryLog(x) given x\n /// @param x logarithm argument in fixed point\n /// @return {\n /// \"lower\": \"lower bound of binaryLog(x) in fixed point\",\n /// \"upper\": \"upper bound of binaryLog(x) in fixed point\"\n /// }\n function log2Bounds(uint x)\n public\n pure\n returns (int lower, int upper)\n {\n require(x > 0);\n // compute ⌊log₂x⌋\n lower = floorLog2(x);\n\n uint y;\n if (lower < 0)\n y = x << uint(-lower);\n else\n y = x >> uint(lower);\n\n lower *= int(ONE);\n\n // y = x * 2^(-⌊log₂x⌋)\n // so 1 <= y < 2\n // and log₂x = ⌊log₂x⌋ + log₂y\n for (int m = 1; m <= 64; m++) {\n if(y == ONE) {\n break;\n }\n y = y * y / ONE;\n if(y >= 2 * ONE) {\n lower += int(ONE >> m);\n y /= 2;\n }\n }\n\n return (lower, lower + 4);\n }\n\n /// @dev Returns base 2 logarithm value of given x\n /// @param x x\n /// @return logarithmic value\n function floorLog2(uint x)\n public\n pure\n returns (int lo)\n {\n lo = -64;\n int hi = 193;\n // I use a shift here instead of / 2 because it floors instead of rounding towards 0\n int mid = (hi + lo) >> 1;\n while((lo + 1) < hi) {\n if (mid < 0 && x << uint(-mid) < ONE || mid >= 0 && x >> uint(mid) < ONE)\n hi = mid;\n else\n lo = mid;\n mid = (hi + lo) >> 1;\n }\n }\n\n /// @dev Returns maximum of an array\n /// @param nums Numbers to look through\n /// @return Maximum number\n function max(int[] memory nums)\n public\n pure\n returns (int maxNum)\n {\n require(nums.length > 0);\n maxNum = -2**255;\n for (uint i = 0; i < nums.length; i++)\n if (nums[i] > maxNum)\n maxNum = nums[i];\n }\n}\n", "sourcePath": "@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol", "ast": { "absolutePath": "@gnosis.pm/util-contracts/contracts/Fixed192x64Math.sol", "exportedSymbols": { "Fixed192x64Math": [ 6793 ] }, "id": 6794, "nodeType": "SourceUnit", "nodes": [ { "id": 5795, "literals": [ "solidity", ">=", "0.4", ".24", "^", "0.5", ".1" ], "nodeType": "PragmaDirective", "src": "0:32:28" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "@title Fixed192x64Math library - Allows calculation of logarithmic and exponential functions\n @author Alan Lu - <alan.lu@gnosis.pm>\n @author Stefan George - <stefan@gnosis.pm>", "fullyImplemented": true, "id": 6793, "linearizedBaseContracts": [ 6793 ], "name": "Fixed192x64Math", "nodeType": "ContractDefinition", "nodes": [ { "canonicalName": "Fixed192x64Math.EstimationMode", "id": 5799, "members": [ { "id": 5796, "name": "LowerBound", "nodeType": "EnumValue", "src": "274:10:28" }, { "id": 5797, "name": "UpperBound", "nodeType": "EnumValue", "src": "286:10:28" }, { "id": 5798, "name": "Midpoint", "nodeType": "EnumValue", "src": "298:8:28" } ], "name": "EstimationMode", "nodeType": "EnumDefinition", "src": "252:56:28" }, { "constant": true, "id": 5802, "name": "ONE", "nodeType": "VariableDeclaration", "scope": 6793, "src": "393:47:28", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5800, "name": "uint", "nodeType": "ElementaryTypeName", "src": "393:4:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "30783130303030303030303030303030303030", "id": 5801, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "421:19:28", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_18446744073709551616_by_1", "typeString": "int_const 18446744073709551616" }, "value": "0x10000000000000000" }, "visibility": "public" }, { "constant": true, "id": 5805, "name": "LN2", "nodeType": "VariableDeclaration", "scope": 6793, "src": "446:45:28", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5803, "name": "uint", "nodeType": "ElementaryTypeName", "src": "446:4:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "307862313732313766376431636637396163", "id": 5804, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "473:18:28", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_12786308645202655660_by_1", "typeString": "int_const 12786308645202655660" }, "value": "0xb17217f7d1cf79ac" }, "visibility": "public" }, { "constant": true, "id": 5808, "name": "LOG2_E", "nodeType": "VariableDeclaration", "scope": 6793, "src": "497:49:28", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 5806, "name": "uint", "nodeType": "ElementaryTypeName", "src": "497:4:28", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "30783137313534373635326238326665313737", "id": 5807, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "527:19:28", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_26613026195688644983_by_1", "typeString": "int_const 26613026195688644983" }, "value": "0x171547652b82fe177" }, "visibility": "public" }, { "body": { "id": 5853, "nodeType": "Block", "src": "775:502:28", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_int256", "typeString": "int256" }, "id": 5818, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5816, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5810, "src": "912:1:28", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "hexValue": "32343534393731323539383738393039383836363739", "id": 5817, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "917:22:28", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2454971259878909886679_by_1", "typeString": "int_const 2454971259878909886679" }, "value": "2454971259878909886679" }, "src": "912:27:28", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 5815, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 7923, 7924 ], "referencedDeclaration": 7923, "src": "904:7:28", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 5819, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "904:36:28", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 5820, "nodeType": "ExpressionStatement", "src": "904:36:28" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_int256", "typeString": "int256" }, "id": 5824, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 5821, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5810, "src": "1064:1:28", "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "nodeType": "BinaryOperation",